ExpressiveInstallerTest\ProcessAnswersTest::testAnsweredWithValidOption PHP Метод

testAnsweredWithValidOption() публичный Метод

    public function testAnsweredWithValidOption()
    {
        // Prepare the installer
        OptionalPackages::removeDevDependencies();
        $io = $this->prophesize('Composer\\IO\\IOInterface');
        $io->write(Argument::containingString('Adding package <info>aura/di</info>'))->shouldBeCalled();
        $io->write(Argument::containingString('Copying <info>/config/container.php</info>'))->shouldBeCalled();
        $config = $this->getConfig();
        $question = $config['questions']['container'];
        $answer = 1;
        $copyFilesKey = 'minimal-files';
        $result = OptionalPackages::processAnswer($io->reveal(), $question, $answer, $copyFilesKey);
        $this->assertTrue($result);
        $this->assertFileExists($this->getProjectRoot() . '/config/container.php');
        $this->assertComposerHasPackages(['aura/di']);
    }