Neos\Flow\Tests\Unit\Core\Booting\ScriptsTest::subProcessCommandEvaluatesIniFileUsageSettingCorrectly PHP Метод

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

    public function subProcessCommandEvaluatesIniFileUsageSettingCorrectly()
    {
        $settings = ['core' => ['context' => 'Testing', 'phpBinaryPathAndFilename' => '/foo/var/php']];
        $message = 'The command must contain the current ini because it is not explicitly set in settings.';
        $actual = $this->scriptsMock->_call('buildSubprocessCommand', 'flow:foo:identifier', $settings);
        $this->assertContains(sprintf(' -c %s ', escapeshellarg(php_ini_loaded_file())), $actual, $message);
        $settings['core']['subRequestPhpIniPathAndFilename'] = null;
        $message = 'The command must contain the current ini because it is explicitly set, but NULL, in settings.';
        $actual = $this->scriptsMock->_call('buildSubprocessCommand', 'flow:foo:identifier', $settings);
        $this->assertContains(sprintf(' -c %s ', escapeshellarg(php_ini_loaded_file())), $actual, $message);
        $settings['core']['subRequestPhpIniPathAndFilename'] = '/foo/ini/path';
        $message = 'The command must contain a specified ini file path because it is set in settings.';
        $actual = $this->scriptsMock->_call('buildSubprocessCommand', 'flow:foo:identifier', $settings);
        $this->assertContains(sprintf(' -c %s ', escapeshellarg('/foo/ini/path')), $actual, $message);
        $settings['core']['subRequestPhpIniPathAndFilename'] = false;
        $message = 'The command must not contain an ini file path because it is set to FALSE in settings.';
        $actual = $this->scriptsMock->_call('buildSubprocessCommand', 'flow:foo:identifier', $settings);
        $this->assertNotContains(' -c ', $actual, $message);
    }