N98\Magento\Command\LocalConfig\GenerateCommandTest::testErrorIsPrintedIfAppEtcDirNotWriteable PHP Метод

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

    public function testErrorIsPrintedIfAppEtcDirNotWriteable()
    {
        $command = $this->getApplication()->find('local-config:generate');
        $originalMode = fileperms(dirname($this->configFile));
        chmod(dirname($this->configFile), 0544);
        $commandTester = new CommandTester($command);
        $commandTester->execute(array('command' => $command->getName(), 'db-host' => 'my_db_host', 'db-user' => 'my_db_user', 'db-pass' => 'my_db_pass', 'db-name' => 'my_db_name', 'session-save' => 'my_session_save', 'admin-frontname' => 'my_admin_frontname', 'encryption-key' => 'key123456789'));
        $this->assertContains(sprintf('Folder %s is not writeable', dirname($this->configFile)), $commandTester->getDisplay());
        chmod(dirname($this->configFile), $originalMode);
    }