diff options
author | Igor Scheller <igor.scheller@igorshp.de> | 2017-11-01 14:47:09 +0100 |
---|---|---|
committer | Igor Scheller <igor.scheller@igorshp.de> | 2017-11-01 16:12:01 +0100 |
commit | ad948bdd3201e922b626a736b0122533bdd37cae (patch) | |
tree | 9011a160f3d6f9cae37fc02836e7d6e8c25242ca /tests/Unit/Http/RequestServiceProviderTest.php | |
parent | e727b367cc77452b58bc2d9360bcde97b7572288 (diff) |
Added RequestServiceProvider and SessionServiceProvider
Diffstat (limited to 'tests/Unit/Http/RequestServiceProviderTest.php')
-rw-r--r-- | tests/Unit/Http/RequestServiceProviderTest.php | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/Unit/Http/RequestServiceProviderTest.php b/tests/Unit/Http/RequestServiceProviderTest.php new file mode 100644 index 00000000..a137b0ac --- /dev/null +++ b/tests/Unit/Http/RequestServiceProviderTest.php @@ -0,0 +1,29 @@ +<?php + +namespace Engelsystem\Test\Unit\Http; + +use Engelsystem\Http\Request; +use Engelsystem\Http\RequestServiceProvider; +use Engelsystem\Test\Unit\ServiceProviderTest; +use PHPUnit_Framework_MockObject_MockObject as MockObject; + +class RequestServiceProviderTest extends ServiceProviderTest +{ + /** + * @covers \Engelsystem\Http\RequestServiceProvider::register() + */ + public function testRegister() + { + /** @var MockObject|Request $request */ + $request = $this->getMockBuilder(Request::class) + ->getMock(); + + $app = $this->getApp(['call', 'instance']); + + $this->setExpects($app, 'call', [[Request::class, 'createFromGlobals']], $request); + $this->setExpects($app, 'instance', ['request', $request]); + + $serviceProvider = new RequestServiceProvider($app); + $serviceProvider->register(); + } +} |