move Url classes, get SMS request URIs from URL class
This commit is contained in:
92
Tests/Url/UrlTest.php
Normal file
92
Tests/Url/UrlTest.php
Normal file
@ -0,0 +1,92 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*
|
||||
* https://www.d3data.de
|
||||
*
|
||||
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
|
||||
* @author D3 Data Development - Daniel Seifert <support@shopmodule.com>
|
||||
* @link https://www.oxidmodule.com
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace D3\LinkmobilityClient\Tests\Url;
|
||||
|
||||
use D3\LinkmobilityClient\Tests\ApiTestCase;
|
||||
use D3\LinkmobilityClient\Url\Url;
|
||||
use ReflectionException;
|
||||
|
||||
class UrlTest extends ApiTestCase
|
||||
{
|
||||
/** @var Url */
|
||||
public $url;
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
$this->url = new Url();
|
||||
}
|
||||
|
||||
public function tearDown(): void
|
||||
{
|
||||
parent::tearDown();
|
||||
|
||||
unset($this->url);
|
||||
}
|
||||
|
||||
/**
|
||||
* @test
|
||||
* @return void
|
||||
* @throws ReflectionException
|
||||
*/
|
||||
public function testGetBaseUri()
|
||||
{
|
||||
$fixture = "fixtureUri";
|
||||
$this->setValue($this->url, 'baseUri', $fixture);
|
||||
|
||||
$this->assertSame(
|
||||
$fixture,
|
||||
$this->callMethod(
|
||||
$this->url,
|
||||
'getBaseUri'
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @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