Ejemplo n.º 1
0
 /**
  * Create application instance
  */
 protected function setUp()
 {
     $assetsPath = Yii::getAlias('@tests/codeception/_output/assets');
     // create assets path
     if (!is_dir($assetsPath)) {
         mkdir($assetsPath, 0755);
     }
     return parent::setUp();
 }
Ejemplo n.º 2
0
 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     \Helper\Dummy\Process::reset();
 }
Ejemplo n.º 3
0
 function setUp()
 {
     parent::setUp();
     set_time_limit(0);
     if (!self::$ignore_files) {
         self::$ignore_files = $this->scan_user_uploads();
     }
     if (!self::$hooks_saved) {
         $this->_backup_hooks();
     }
     global $wpdb, $wp_rewrite;
     $wpdb->suppress_errors = false;
     $wpdb->show_errors = true;
     $wpdb->db_connect();
     ini_set('display_errors', 1);
     $this->clean_up_global_scope();
     /*
      * When running core tests, ensure that post types and taxonomies
      * are reset for each test. We skip this step for non-core tests,
      * given the large number of plugins that register post types and
      * taxonomies at 'init'.
      */
     if (defined('WP_RUN_CORE_TESTS') && WP_RUN_CORE_TESTS) {
         $this->reset_post_types();
         $this->reset_taxonomies();
         $this->reset_post_statuses();
         if ($wp_rewrite->permalink_structure) {
             $this->set_permalink_structure('');
         }
     }
     $this->start_transaction();
     $this->expectDeprecated();
     add_filter('wp_die_handler', array($this, 'get_wp_die_handler'));
 }
Ejemplo n.º 4
0
 /**
  * Create application instance
  */
 protected function setUp()
 {
     $config = ArrayHelper::merge(['class' => $this->appClass], require dirname(__DIR__) . '/config/unit.php', $this->appConfig);
     Yii::createObject($config);
     return parent::setUp();
 }
Ejemplo n.º 5
0
 /**
  *
  */
 protected function setUp()
 {
     parent::setUp();
     $this->colorizer = new Colorizer();
 }