move Url classes, get SMS request URIs from URL class
This commit is contained in:
@ -23,8 +23,8 @@ use D3\LinkmobilityClient\Request\RequestInterface;
|
||||
use D3\LinkmobilityClient\Response\Response;
|
||||
use D3\LinkmobilityClient\Response\ResponseInterface;
|
||||
use D3\LinkmobilityClient\SMS\TextRequest;
|
||||
use D3\LinkmobilityClient\Url;
|
||||
use D3\LinkmobilityClient\UrlInterface;
|
||||
use D3\LinkmobilityClient\Url\Url;
|
||||
use D3\LinkmobilityClient\Url\UrlInterface;
|
||||
use GuzzleHttp\Client as GuzzleClient;
|
||||
use GuzzleHttp\ClientInterface;
|
||||
use PHPUnit\Framework\MockObject\MockObject;
|
||||
|
@ -92,6 +92,20 @@ abstract class AbstractRequest extends ApiTestCase
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @test
|
||||
* @throws ReflectionException
|
||||
*/
|
||||
public function testGetUri()
|
||||
{
|
||||
$this->assertIsString(
|
||||
$this->callMethod(
|
||||
$this->request,
|
||||
'getUri'
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @test
|
||||
* @throws ReflectionException
|
||||
@ -228,8 +242,6 @@ abstract class AbstractRequest extends ApiTestCase
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @test
|
||||
* @throws ReflectionException
|
||||
|
@ -13,9 +13,10 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace D3\LinkmobilityClient\Tests;
|
||||
namespace D3\LinkmobilityClient\Tests\Url;
|
||||
|
||||
use D3\LinkmobilityClient\Url;
|
||||
use D3\LinkmobilityClient\Tests\ApiTestCase;
|
||||
use D3\LinkmobilityClient\Url\Url;
|
||||
use ReflectionException;
|
||||
|
||||
class UrlTest extends ApiTestCase
|
||||
@ -58,4 +59,34 @@ class UrlTest extends ApiTestCase
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @test
|
||||
* @throws ReflectionException
|
||||
*/
|
||||
public function testGetTextSmsUri()
|
||||
{
|
||||
$uri = $this->callMethod(
|
||||
$this->url,
|
||||
'getTextSmsUri'
|
||||
);
|
||||
|
||||
$this->assertIsString($uri);
|
||||
$this->assertStringStartsWith('/', $uri);
|
||||
}
|
||||
|
||||
/**
|
||||
* @test
|
||||
* @throws ReflectionException
|
||||
*/
|
||||
public function testGetBinarySmsUri()
|
||||
{
|
||||
$uri = $this->callMethod(
|
||||
$this->url,
|
||||
'getBinarySmsUri'
|
||||
);
|
||||
|
||||
$this->assertIsString($uri);
|
||||
$this->assertStringStartsWith('/', $uri);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user