<commit_before><?php

namespace luyatests\core\base;

use luya\Boot;

class BootTest extends \luyatests\LuyaWebTestCase
{
    public function testBaseObject()
    {
        $boot = new Boot();
        $this->assertEquals('cli', $boot->getSapiName());
    }

    /**
     * @expectedException Exception
     */
    public function testUnableToFindConfigFile()
    {
        $boot = new Boot();
        $boot->run();
    }
    
    /**
     * @expectedException Exception
     */
    public function testWrongConfigFile()
    {
        $boot = new Boot();
        $boot->configFile = __DIR__ . '/../../data/configs/wrongconfig.php';
        $boot->run();
    }
    
    /**
     * @expectedException Exception
     */
    public function testYiiNotFound()
    {
        $boot = new Boot();
        $boot->configFile = __DIR__ . '/../../data/configs/console.php';
        $boot->setYiiPath('wrongPathToYii.php');
        $boot->mockOnly = true;
        $boot->applicationConsole();
    }
}<commit_msg>add getter/setter test for config<commit_after><?php

namespace luyatests\core\base;

use luya\Boot;

class BootTest extends \luyatests\LuyaWebTestCase
{
    public function testBaseObject()
    {
        $boot = new Boot();
        $this->assertEquals('cli', $boot->getSapiName());
    }

    /**
     * @expectedException Exception
     */
    public function testUnableToFindConfigFile()
    {
        $boot = new Boot();
        $boot->run();
    }
    
    /**
     * @expectedException Exception
     */
    public function testWrongConfigFile()
    {
        $boot = new Boot();
        $boot->configFile = __DIR__ . '/../../data/configs/wrongconfig.php';
        $boot->run();
    }
    
    /**
     * @expectedException Exception
     */
    public function testYiiNotFound()
    {
        $boot = new Boot();
        $boot->configFile = __DIR__ . '/../../data/configs/console.php';
        $boot->setYiiPath('wrongPathToYii.php');
        $boot->mockOnly = true;
        $boot->applicationConsole();
    }
    
    public function testSetterGetterConfig()
    {
    	$boot = new Boot();
    	$boot->setConfigArray(['foo' => 'bar']);
    	$this->assertSame(['foo' => 'bar'], $boot->getConfigArray());
    }
}
{'fraction_non_alphanumeric': 0.157942238267148, 'fraction_numerical': 0.0, 'mean_word_length': 2.1536273115220483, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 26, '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': '943006', 'n_tokens_mistral': 684, 'n_tokens_neox': 674, 'n_words': 121}