Exemple #1
0
 protected function setUp()
 {
     parent::setUp();
     \XLite\Core\Database::getEM()->clear();
 }
Exemple #2
0
 /**
  * Return test execution time
  *
  * @return string
  * @see    ____func_see____
  * @since  1.0.0
  */
 private function getExecTime()
 {
     $time = number_format($this->end['time'] - $this->start['time'], 4);
     $message = trim($this->getMessage('', get_called_class(), $this->getName()));
     if (strlen($message) > self::$messageLength) {
         self::$messageLength = strlen($message) + 1;
     }
     return sprintf('%\'.-' . self::$messageLength . 's', trim($message)) . ' ' . sprintf('%8s', $time) . ' sec .....';
 }
Exemple #3
0
 /**
  * tearDown
  *
  * @return void
  * @access protected
  * @see    ____func_see____
  * @since  1.0.0
  */
 protected function tearDown()
 {
     parent::tearDown();
     // Not needed right now
     $this->doRestoreDb();
 }
Exemple #4
0
 /**
  * tearDown
  *
  * @return void
  * @access protected
  * @see    ____func_see____
  * @since  1.0.0
  */
 protected function tearDown()
 {
     parent::tearDown();
     $this->doRestoreDb();
 }
Exemple #5
0
 /**
  * setUpBeforeClass 
  * 
  * @return void
  * @see    ____func_see____
  * @since  1.0.24
  */
 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     self::prepareData();
 }
Exemple #6
0
 /**
  * Return data needed to start application.
  * Derived class can redefine this method.
  * It's possible to detect current test using the $this->name variable
  *
  * @return array
  * @see    ____func_see____
  * @since  1.0.0
  */
 protected function getRequest()
 {
     $request = parent::getRequest();
     $request['controller'] = false;
     return $request;
 }
Exemple #7
0
 /**
  * tearDown
  *
  * @return void
  * @see    ____func_see____
  * @since  1.0.22
  */
 protected function tearDown()
 {
     xdebug_stop_code_coverage(false);
     if (!empty($this->orders)) {
         foreach ($this->orders as $order) {
             $this->clearEntity($order);
         }
     }
     if ($this->order) {
         $this->clearEntity($this->order);
     }
     $this->order = null;
     xdebug_start_code_coverage(XDEBUG_CC_UNUSED | XDEBUG_CC_DEAD_CODE);
     parent::tearDown();
 }
Exemple #8
0
 /**
  * setUp
  *
  * @return void
  * @see    ____func_see____
  * @since  1.0.0
  */
 protected function setUp()
 {
     parent::setUp();
     $this->doRestoreDb(__DIR__ . '/Repo/sql/module/setup.sql', false);
 }
Exemple #9
0
 static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     xlite_restore_sql_from_backup();
 }
Exemple #10
0
 protected function tearDown()
 {
     $this->clearEntity($this->formId);
     parent::tearDown();
 }
Exemple #11
0
 protected function tearDown()
 {
     $this->product = null;
     $this->doRestoreDb();
     parent::tearDown();
 }