<commit_before><?php

namespace Sokil\Mongo\Migrator;

use Symfony\Component\Yaml\Yaml;

class ConfigTest extends \PHPUnit_Framework_TestCase
{
    protected $_config;
    
    public function setUp()
    {
        $configFile = __DIR__ . '/' . \Sokil\Mongo\Migrator\Console\Command::CONFIG_FILENAME . '.yaml';
        $this->_config = new Config(Yaml::parse($configFile));
    }
    
    public function testGet()
    {
        $this->assertEquals('migrations', $this->_config->get('path.migrations'));
    }
    
    public function testGetDefaultDatabaseName()
    {        
        $this->assertEquals('test', $this->_config->getDefaultDatabaseName('development'));
    }
    
    public function testGetDsn()
    {        
        $this->assertEquals('mongodb://localhost', $this->_config->getDsn('development'));
    }

    public function testGetConnectOptions()
    {
        $this->assertEquals(array('replicaSet' => 'testrs'), $this->_config->getConnectOptions('development'));
    }
    
    public function testGetLogDatabaseName()
    {        
        $this->assertEquals('test', $this->_config->getLogDatabaseName('development'));
    }
    
    public function testGetLogCollectionName()
    {        
        $this->assertEquals('migrations', $this->_config->getLogCollectionName('development'));
    }
}<commit_msg>test unexisted connectOptions config<commit_after><?php

namespace Sokil\Mongo\Migrator;

use Symfony\Component\Yaml\Yaml;

class ConfigTest extends \PHPUnit_Framework_TestCase
{
    protected $_config;
    
    public function setUp()
    {
        $configFile = __DIR__ . '/' . \Sokil\Mongo\Migrator\Console\Command::CONFIG_FILENAME . '.yaml';
        $this->_config = new Config(Yaml::parse($configFile));
    }
    
    public function testGet()
    {
        $this->assertEquals('migrations', $this->_config->get('path.migrations'));
    }
    
    public function testGetDefaultDatabaseName()
    {        
        $this->assertEquals('test', $this->_config->getDefaultDatabaseName('development'));
    }
    
    public function testGetDsn()
    {        
        $this->assertEquals('mongodb://localhost', $this->_config->getDsn('development'));
    }

    public function testGetConnectOptions()
    {
        $this->assertEquals(array('replicaSet' => 'testrs'), $this->_config->getConnectOptions('development'));
        $this->assertEquals(array(), $this->_config->getConnectOptions('staging'));
    }
    
    public function testGetLogDatabaseName()
    {        
        $this->assertEquals('test', $this->_config->getLogDatabaseName('development'));
    }
    
    public function testGetLogCollectionName()
    {        
        $this->assertEquals('migrations', $this->_config->getLogCollectionName('development'));
    }
}
{'fraction_non_alphanumeric': 0.14641182834475297, 'fraction_numerical': 0.0, 'mean_word_length': 3.097488921713442, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 46, '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': '2601881', 'n_tokens_mistral': 788, 'n_tokens_neox': 782, 'n_words': 109}