linkmobility-php-client/Tests/Url/UrlTest.php

93 lines
1.8 KiB
PHP
Raw Normal View History

2022-07-10 21:52:37 +02:00
<?php
/**
2022-07-13 10:50:45 +02:00
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* https://www.d3data.de
2022-07-10 21:52:37 +02:00
*
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
2022-07-13 10:50:45 +02:00
* @author D3 Data Development - Daniel Seifert <support@shopmodule.com>
* @link https://www.oxidmodule.com
2022-07-10 21:52:37 +02:00
*/
2022-07-13 10:41:23 +02:00
declare(strict_types=1);
2022-07-10 21:52:37 +02:00
namespace D3\LinkmobilityClient\Tests\Url;
2022-07-10 21:52:37 +02:00
use D3\LinkmobilityClient\Tests\ApiTestCase;
use D3\LinkmobilityClient\Url\Url;
2022-07-10 21:52:37 +02:00
use ReflectionException;
class UrlTest extends ApiTestCase
{
/** @var Url */
2022-07-11 15:06:18 +02:00
public $url;
2022-07-10 21:52:37 +02:00
/**
* @return void
*/
2022-07-13 10:41:23 +02:00
public function setUp(): void
2022-07-10 21:52:37 +02:00
{
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);
}
2022-07-10 21:52:37 +02:00
}