Пример #1
0
 public function setUp()
 {
     parent::setUp();
     $this->Customer = $this->createCustomer();
     $this->Order = $this->createOrder($this->Customer);
     $TaxRule = $this->app['eccube.repository.tax_rule']->getByRule();
     $this->rate = $TaxRule->getTaxRate();
 }
Пример #2
0
 public function setUp()
 {
     parent::setUp();
     $this->BaseInfo = $this->app['eccube.repository.base_info']->get();
     $this->BaseInfo->setOptionProductTaxRule(0);
     $this->TaxRule1 = $this->app['eccube.repository.tax_rule']->find(1);
     $this->TaxRule1->setApplyDate(new \DateTime('-1 day'));
     $this->app['orm.em']->flush();
 }
Пример #3
0
 public function setUp()
 {
     parent::setUp();
     $this->Customer = $this->createCustomer();
     $this->app['security']->setToken(new UsernamePasswordToken($this->Customer, null, 'Customer', $this->Customer->getRoles()));
     $this->CartService = $this->app['eccube.service.cart'];
     $this->CartService->setProductQuantity(1, 1)->save();
     $this->ProductType1 = $this->app['eccube.repository.master.product_type']->find(1);
     $this->ProductType2 = $this->app['eccube.repository.master.product_type']->find(2);
 }
Пример #4
0
 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'));
 }
Пример #5
0
 public function setUp()
 {
     parent::setUp();
     $this->ProductType1 = $this->app['eccube.repository.master.product_type']->find(1);
     $this->ProductType2 = $this->app['eccube.repository.master.product_type']->find(2);
     $this->Product = $this->createProduct();
     // ProductType 2 の商品を作成
     $this->Product2 = $this->createProduct();
     foreach ($this->Product2->getProductClasses() as $ProductClass) {
         $ProductClass->setProductType($this->ProductType2);
     }
     $this->app['orm.em']->flush();
 }
Пример #6
0
 public function tearDown()
 {
     $dirs = array();
     $finder = new Finder();
     $iterator = $finder->in($this->app['config']['plugin_realdir'])->name('dummy*')->directories();
     foreach ($iterator as $dir) {
         $dirs[] = $dir->getPathName();
     }
     foreach ($dirs as $dir) {
         $this->deleteFile($dir);
     }
     parent::tearDown();
 }
Пример #7
0
 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();
 }
Пример #8
0
 public function tearDown()
 {
     $this->cleanUpMessages();
     parent::tearDown();
 }
Пример #9
0
 public function tearDown()
 {
     $this->app['orm.em']->getConnection()->close();
     parent::tearDown();
 }
 public function setUp()
 {
     parent::setUp();
 }