Neos\Flow\Tests\Unit\Configuration\Source\YamlSourceTest::saveWritesArrayToGivenFileAsYAML PHP Method

saveWritesArrayToGivenFileAsYAML() public method

    public function saveWritesArrayToGivenFileAsYAML()
    {
        $pathAndFilename = vfsStream::url('testDirectory') . '/YAMLConfiguration';
        $configurationSource = new YamlSource();
        $mockConfiguration = ['configurationFileHasBeenLoaded' => true, 'foo' => ['bar' => 'Baz']];
        $configurationSource->save($pathAndFilename, $mockConfiguration);
        $yaml = 'configurationFileHasBeenLoaded: true' . chr(10) . 'foo:' . chr(10) . '  bar: Baz' . chr(10);
        $this->assertContains($yaml, file_get_contents($pathAndFilename . '.yaml'), 'Configuration was not written to the file as expected.');
    }