mirror of
https://github.com/shlinkio/shlink.git
synced 2026-03-06 23:33:13 +08:00
Added more Rest module tests
This commit is contained in:
33
module/Rest/test/ConfigProviderTest.php
Normal file
33
module/Rest/test/ConfigProviderTest.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
namespace ShlinkioTest\Shlink\Rest;
|
||||
|
||||
use PHPUnit_Framework_TestCase as TestCase;
|
||||
use Shlinkio\Shlink\Rest\ConfigProvider;
|
||||
|
||||
class ConfigProviderTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var ConfigProvider
|
||||
*/
|
||||
protected $configProvider;
|
||||
|
||||
public function setUp()
|
||||
{
|
||||
$this->configProvider = new ConfigProvider();
|
||||
}
|
||||
|
||||
/**
|
||||
* @test
|
||||
*/
|
||||
public function properConfigIsReturned()
|
||||
{
|
||||
$config = $this->configProvider->__invoke();
|
||||
|
||||
$this->assertArrayHasKey('error_handler', $config);
|
||||
$this->assertArrayHasKey('middleware_pipeline', $config);
|
||||
$this->assertArrayHasKey('rest', $config);
|
||||
$this->assertArrayHasKey('routes', $config);
|
||||
$this->assertArrayHasKey('services', $config);
|
||||
$this->assertArrayHasKey('translator', $config);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user