blob: a137b0ac0f7b49d8d6c5da9179391223cbad9c6a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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();
}
}
|