tao-test/app/vendor/jtl-software/opsgenie-client/tests/Heartbeat/PingRequestTest.php

38 lines
792 B
PHP

<?php
/**
* This File is part of JTL-Software
*
* User: rherrgesell
* Date: 3/15/19
*/
namespace JTL\OpsGenie\Client\Heartbeat;
use PHPUnit\Framework\TestCase;
/**
* Class PingRequestTest
* @covers \JTL\OpsGenie\Client\Heartbeat\PingRequest
*/
class PingRequestTest extends TestCase
{
public function testHttpMethodIsPut()
{
$request = new PingRequest('dingens');
$this->assertEquals('PUT', $request->getHttpMethod());
}
public function testBodyIsEmpty()
{
$request = new PingRequest('dingens');
$this->assertEquals([], $request->getBody());
}
public function testGetUrl()
{
$request = new PingRequest('url-foo-bar');
$this->assertEquals('heartbeats/url-foo-bar/ping', $request->getUrl());
}
}