public function testConfigureDependencyInjection()
 {
     //setup
     $module = new GuzzleHTTPModule();
     $dic = new DependencyInjectionContainerMock();
     $config = [$module->getModuleKey() => []];
     //act
     $module->configureDependencyInjection($dic, $config[$module->getModuleKey()], $config);
     //assert
     $this->assertEquals([HTTPServerFactory::class => GuzzleHTTPServerFactory::class, ServerRequestInterface::class => ServerRequest::class, ResponseInterface::class => Response::class], $dic->getAliases());
 }
 public function setUp()
 {
     $this->dic = new AurynDependencyInjectionContainer();
     $webModule = new WebModule();
     $guzzleModule = new GuzzleHTTPModule();
     $controllerModule = new ControllerProcessorWebModule();
     $config = [$webModule->getModuleKey() => [], $guzzleModule->getModuleKey() => [], $controllerModule->getModuleKey() => []];
     $webModule->loadConfiguration($config[$webModule->getModuleKey()], $config);
     $guzzleModule->loadConfiguration($config[$guzzleModule->getModuleKey()], $config);
     $controllerModule->loadConfiguration($config[$controllerModule->getModuleKey()], $config);
     $this->dic->alias(Router::class, RouterMock::class);
     $this->dic->alias(ControllerViewProcessor::class, ControllerViewProcessorMock::class);
     $webModule->configureDependencyInjection($this->dic, $config[$webModule->getModuleKey()], $config);
     $guzzleModule->configureDependencyInjection($this->dic, $config[$guzzleModule->getModuleKey()], $config);
     $controllerModule->configureDependencyInjection($this->dic, $config[$controllerModule->getModuleKey()], $config);
 }
 /**
  * @covers Piccolo\Web\HTTP\Guzzle\GuzzleHTTPServerFactory
  * @covers Piccolo\Web\HTTP\Guzzle\GuzzleHTTPModule
  */
 public function testCreateReadOnlyFileStream()
 {
     //setup
     $dic = new AurynDependencyInjectionContainer();
     $module = new GuzzleHTTPModule();
     $config = [$module->getModuleKey() => []];
     $module->configureDependencyInjection($dic, $config[$module->getModuleKey()], $config);
     //act
     /**
      * @var HTTPServerFactory $factory
      */
     $factory = $dic->make(HTTPServerFactory::class);
     $stream = $factory->createReadOnlyFileStream(__DIR__ . '/../testdata/helloworld.txt');
     //assert
     $this->assertEquals('Hello world!', $stream->read(32));
 }