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
868 B
PHP
30 lines
868 B
PHP
<?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();
|
|
}
|
|
}
|