public function tearDown()
 {
     if (file_exists($this->filepath)) {
         unlink($this->filepath);
     }
     parent::tearDown();
 }
 public function setUp()
 {
     parent::setUp();
     $this->Customer = $this->createCustomer();
     $this->Order = $this->createOrder($this->Customer);
     $this->Product = $this->createProduct();
 }
Esempio n. 3
0
 public function setUp()
 {
     parent::setUp();
     $Sex = $this->app['eccube.repository.master.sex']->find(1);
     $Payment = $this->app['eccube.repository.payment']->find(1);
     $OrderStatus = $this->app['eccube.repository.order_status']->find($this->app['config']['order_new']);
     for ($i = 0; $i < 10; $i++) {
         $Customer = $this->createCustomer('user-' . $i . '@example.com');
         $Customer->setSex($Sex);
         $Order = $this->createOrder($Customer);
         $Order->setOrderStatus($OrderStatus);
         $Order->setPayment($Payment);
         $this->app['orm.em']->flush();
     }
     // sqlite では CsvType が生成されないので、ここで作る
     $OrderCsvType = $this->app['eccube.repository.master.csv_type']->find(3);
     if (!is_object($OrderCsvType)) {
         $OrderCsvType = new CsvType();
         $OrderCsvType->setId(3);
         $OrderCsvType->setName('受注CSV');
         $OrderCsvType->setRank(4);
         $this->app['orm.em']->persist($OrderCsvType);
         $this->app['orm.em']->flush();
     }
     $ShipCsvType = $this->app['eccube.repository.master.csv_type']->find(4);
     if (!is_object($ShipCsvType)) {
         $ShipCsvType = new CsvType();
         $ShipCsvType->setId(4);
         $ShipCsvType->setName('配送CSV');
         $ShipCsvType->setRank(5);
         $this->app['orm.em']->persist($ShipCsvType);
         $this->app['orm.em']->flush();
     }
 }
Esempio n. 4
0
 /**
  * rollback
  */
 public function tearDown()
 {
     parent::tearDown();
     // TODO: Change the autogenerated stub
     if (file_exists($this->logTest)) {
         unlink($this->logTest);
     }
 }
Esempio n. 5
0
 public function setUp()
 {
     parent::setUp();
     $Csv = $this->app['eccube.repository.csv']->find(1);
     $Csv->setRank(1);
     $Csv->setEnableFlg(Constant::DISABLED);
     $this->app['orm.em']->flush();
 }
 /**
  * Delete all Recommend for testing.
  */
 public function setUp()
 {
     parent::setUp();
     $this->deleteAllRows(array('plg_recommend_product'));
     // recommend for product 1 with rank 1
     $this->initRecommendData(1, 1);
     // recommend for product 2 with rank 2
     $this->initRecommendData(2, 2);
 }
Esempio n. 7
0
 public function setUp()
 {
     parent::setUp();
     // TODO: Change the autogenerated stub
     $this->formData = array('_token' => 'dummy', 'files' => 'site_' . date('Y-m-d') . '.log', 'line_max' => '50');
     $this->logTest = $this->app['config']['root_dir'] . '/app/log/' . $this->formData['files'];
     if (!file_exists($this->logTest)) {
         file_put_contents($this->logTest, 'test');
     }
 }
 public function setUp()
 {
     parent::setUp();
     $this->deleteAllRows(array('plg_product_review'));
     $this->dummyData = array();
     $this->dummyData[] = $this->initDummyData(1, 0);
     $this->dummyData[] = $this->initDummyData(2, 0);
     $this->dummyData[] = $this->initDummyData(1, 1);
     $this->dummyData[] = $this->initDummyData(2, 1);
 }
Esempio n. 9
0
 public function setUp()
 {
     parent::setUp();
     $this->removeClass();
     $this->Member = $this->app['eccube.repository.member']->find(2);
     for ($i = 0; $i < 3; $i++) {
         $ClassName = new ClassName();
         $ClassName->setName('class-' . $i)->setCreator($this->Member)->setDelFlg(0)->setRank($i);
         $this->app['orm.em']->persist($ClassName);
     }
     $this->app['orm.em']->flush();
 }
Esempio n. 10
0
 public function setUp()
 {
     parent::setUp();
     // 一旦別の変数に代入しないと, config 以下の値を書きかえることができない
     $config = $this->app['config'];
     $config['template_default_realdir'] = sys_get_temp_dir() . '/FileController' . sha1(mt_rand());
     // vfs が使えないため
     if (!file_exists($config['template_default_realdir'] . '/user_data')) {
         mkdir($config['template_default_realdir'] . '/user_data', 0777, true);
     }
     $config['user_data_realdir'] = $config['template_default_realdir'] . '/user_data';
     $this->app['config'] = $config;
 }
 /**
  * Setup before test
  */
 public function setUp()
 {
     parent::setUp();
     // TODO: Change the autogenerated stub
     // 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);
 }
Esempio n. 12
0
 public function setUp()
 {
     parent::setUp();
     $this->remove();
     $this->createCategories();
 }
Esempio n. 13
0
 public function setUp()
 {
     parent::setUp();
 }
 /**
  * call parent setUp.
  */
 public function setUp()
 {
     parent::setUp();
     $this->deleteAllRows(array('plg_related_product'));
 }
 /**
  * Setup.
  */
 public function setUp()
 {
     parent::setUp();
     $this->addCategoryContent(CATEGORY_ID_3, CATEGORY_CONTENT);
 }
Esempio n. 16
0
 public function tearDown()
 {
     parent::tearDown();
 }
 /**
  * Set up function.
  */
 public function setUp()
 {
     parent::setUp();
     $this->deleteAllRows(array('dtb_order_detail'));
 }
 public function setUp()
 {
     parent::setUp();
     $this->Customer = $this->createCustomer();
 }
Esempio n. 19
0
 public function tearDown()
 {
     $this->cleanUpMailCatcherMessages();
     parent::tearDown();
 }
Esempio n. 20
0
 public function setUp()
 {
     parent::setUp();
     $this->Member = $this->createMember();
 }