From 60fd72cd1a1e4e53b9af87e00a8c27687c6b5385 Mon Sep 17 00:00:00 2001 From: Igor Scheller Date: Tue, 31 Oct 2017 13:40:13 +0100 Subject: Added service providers --- tests/Unit/Routing/RoutingServiceProviderTest.php | 39 +++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 tests/Unit/Routing/RoutingServiceProviderTest.php (limited to 'tests/Unit/Routing') diff --git a/tests/Unit/Routing/RoutingServiceProviderTest.php b/tests/Unit/Routing/RoutingServiceProviderTest.php new file mode 100644 index 00000000..4f1cd5fc --- /dev/null +++ b/tests/Unit/Routing/RoutingServiceProviderTest.php @@ -0,0 +1,39 @@ +getMockBuilder(UrlGenerator::class) + ->getMock(); + + /** @var PHPUnit_Framework_MockObject_MockObject|Application $app */ + $app = $this->getMockBuilder(Application::class) + ->setMethods(['make', 'instance']) + ->getMock(); + + $app->expects($this->once()) + ->method('make') + ->with(UrlGenerator::class) + ->willReturn($urlGenerator); + + $app->expects($this->once()) + ->method('instance') + ->with('routing.urlGenerator', $urlGenerator); + + $serviceProvider = new RoutingServiceProvider($app); + $serviceProvider->register(); + } +} -- cgit v1.2.3-54-g00ecf