ExpressiveInstallerTest\ErrorHandlerTest::testErrorHandler PHP Method

testErrorHandler() public method

public testErrorHandler ( $containerOption, $errorHandlerOption, $copyFilesKey, $expectedErrorHandler )
    public function testErrorHandler($containerOption, $errorHandlerOption, $copyFilesKey, $expectedErrorHandler)
    {
        $io = $this->prophesize('Composer\\IO\\IOInterface');
        $config = $this->getConfig();
        // Install container
        $containerResult = OptionalPackages::processAnswer($io->reveal(), $config['questions']['container'], $containerOption, $copyFilesKey);
        $this->assertTrue($containerResult);
        // Install error handler
        $containerResult = OptionalPackages::processAnswer($io->reveal(), $config['questions']['error-handler'], $errorHandlerOption, $copyFilesKey);
        $this->assertTrue($containerResult);
        // Test container
        $container = $this->getContainer();
        $this->assertTrue($container->has('Zend\\Expressive\\FinalHandler'));
        $config = $container->get('config');
        $this->assertEquals($expectedErrorHandler, $config['dependencies']['factories']['Zend\\Expressive\\FinalHandler']);
    }