<commit_before><?php

use Homesteader\Config\HomesteadConfig;
use org\bovigo\vfs\vfsStream;

class ConfigHomesteadConfigTest extends \PHPUnit_Framework_TestCase {

    protected $homesteadConfigFile;

    public function setUp()
    {
        $homesteadPath = '.homestead';
        vfsStream::setup($homesteadPath);
        $this->homesteadConfigFile = vfsStream::url("$homesteadPath/Homestead.yaml");
        file_put_contents($this->homesteadConfigFile, file_get_contents(dirname(__FILE__) . '/DefaultHomestead.yaml'));
        echo file_get_contents($this->homesteadConfigFile); exit;
    }

    public function testConfigFileOpensAsString()
    {
        $configFile = new HomesteadConfig($this->homesteadConfigFile);
        $this->assertStringStartsWith('---', (string) $configFile);
        $this->assertStringStartsWith('---', $configFile->asString());
    }

    public function testConfigFileOpensAsArray()
    {
        $configFile = new HomesteadConfig($this->homesteadConfigFile);
        $this->assertArrayHasKey('ip', $configFile->asArray());
        $this->assertArrayHasKey('memory', $configFile->asArray());
        $this->assertArrayHasKey('cpus', $configFile->asArray());
        $this->assertArrayHasKey('authorize', $configFile->asArray());
        $this->assertArrayHasKey('keys', $configFile->asArray());
        $this->assertArrayHasKey('folders', $configFile->asArray());
        $this->assertArrayHasKey('sites', $configFile->asArray());
        $this->assertArrayHasKey('databases', $configFile->asArray());
        $this->assertArrayHasKey('variables', $configFile->asArray());
    }

} <commit_msg>Removed debug<commit_after><?php

use Homesteader\Config\HomesteadConfig;
use org\bovigo\vfs\vfsStream;

class ConfigHomesteadConfigTest extends \PHPUnit_Framework_TestCase {

    protected $homesteadConfigFile;

    public function setUp()
    {
        $homesteadPath = '.homestead';
        vfsStream::setup($homesteadPath);
        $this->homesteadConfigFile = vfsStream::url("$homesteadPath/Homestead.yaml");
    }

    public function testConfigFileOpensAsString()
    {
        $configFile = new HomesteadConfig($this->homesteadConfigFile);
        $this->assertStringStartsWith('---', (string) $configFile);
        $this->assertStringStartsWith('---', $configFile->asString());
    }

    public function testConfigFileOpensAsArray()
    {
        $configFile = new HomesteadConfig($this->homesteadConfigFile);
        $this->assertArrayHasKey('ip', $configFile->asArray());
        $this->assertArrayHasKey('memory', $configFile->asArray());
        $this->assertArrayHasKey('cpus', $configFile->asArray());
        $this->assertArrayHasKey('authorize', $configFile->asArray());
        $this->assertArrayHasKey('keys', $configFile->asArray());
        $this->assertArrayHasKey('folders', $configFile->asArray());
        $this->assertArrayHasKey('sites', $configFile->asArray());
        $this->assertArrayHasKey('databases', $configFile->asArray());
        $this->assertArrayHasKey('variables', $configFile->asArray());
    }

} 
{'fraction_non_alphanumeric': 0.15667752442996744, 'fraction_numerical': 0.0, 'mean_word_length': 4.205084745762712, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 53, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2997811', 'n_tokens_mistral': 922, 'n_tokens_neox': 886, 'n_words': 115}