Eccube\Tests\Service\CsvExportServiceTest::setUp PHP Метод

setUp() публичный Метод

public setUp ( )
    public function setUp()
    {
        parent::setUp();
        $root = vfsStream::setup('rootDir');
        $this->url = vfsStream::url('rootDir/test.csv');
        // CsvExportService のファイルポインタを Vfs のファイルポインタにしておく
        $objReflect = new \ReflectionClass($this->app['eccube.service.csv.export']);
        $Property = $objReflect->getProperty('fp');
        $Property->setAccessible(true);
        $Property->setValue($this->app['eccube.service.csv.export'], fopen($this->url, 'w'));
        $Csv = $this->app['eccube.repository.csv']->find(1);
        $Csv->setRank(1);
        $Csv->setEnableFlg(Constant::DISABLED);
        $this->app['orm.em']->flush();
    }