You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
913 B
PHTML
30 lines
913 B
PHTML
7 years ago
|
<?php
|
||
|
|
||
7 years ago
|
namespace Engelsystem\Test\Unit\Routing;
|
||
7 years ago
|
|
||
6 years ago
|
use Engelsystem\Http\UrlGenerator;
|
||
|
use Engelsystem\Http\UrlGeneratorServiceProvider;
|
||
7 years ago
|
use Engelsystem\Test\Unit\ServiceProviderTest;
|
||
7 years ago
|
use PHPUnit_Framework_MockObject_MockObject;
|
||
|
|
||
6 years ago
|
class UrlGeneratorServiceProviderTest extends ServiceProviderTest
|
||
7 years ago
|
{
|
||
|
/**
|
||
6 years ago
|
* @covers \Engelsystem\Http\UrlGeneratorServiceProvider::register()
|
||
7 years ago
|
*/
|
||
|
public function testRegister()
|
||
|
{
|
||
|
/** @var PHPUnit_Framework_MockObject_MockObject|UrlGenerator $urlGenerator */
|
||
|
$urlGenerator = $this->getMockBuilder(UrlGenerator::class)
|
||
|
->getMock();
|
||
|
|
||
7 years ago
|
$app = $this->getApp();
|
||
7 years ago
|
|
||
7 years ago
|
$this->setExpects($app, 'make', [UrlGenerator::class], $urlGenerator);
|
||
6 years ago
|
$this->setExpects($app, 'instance', ['http.urlGenerator', $urlGenerator]);
|
||
7 years ago
|
|
||
6 years ago
|
$serviceProvider = new UrlGeneratorServiceProvider($app);
|
||
7 years ago
|
$serviceProvider->register();
|
||
|
}
|
||
|
}
|