Eccube\Tests\Web\Admin\Setting\Shop\SecurityControllerTest::setUp PHP Method

setUp() public method

Setup before test
public setUp ( )
    public function setUp()
    {
        parent::setUp();
        // TODO: Change the autogenerated stub
        // ログを出力させない
        $this->app['monolog.logger.admin']->pushHandler(new NullHandler());
        // virtual directory
        vfsStream::setup('rootDir');
        $config = $this->app['config'];
        $this->configFileReal = $config['root_dir'] . '/app/config/eccube/config.yml';
        $this->pathFileReal = $config['root_dir'] . '/app/config/eccube/path.yml';
        if (!file_exists($this->configFileReal) || !file_exists($this->pathFileReal)) {
            $this->markTestSkipped('Skip if not have config file');
        }
        $structure = array('app' => array('config' => array('eccube' => array('config.yml' => file_get_contents($this->configFileReal), 'path.yml' => file_get_contents($this->pathFileReal)))));
        $config['root_dir'] = vfsStream::url('rootDir');
        // dump file
        $this->configFile = $config['root_dir'] . '/app/config/eccube/config.yml';
        $this->pathFile = $config['root_dir'] . '/app/config/eccube/path.yml';
        $this->app['config'] = $config;
        vfsStream::create($structure);
    }