function setUp() { parent::setUp(); $this->config = Factory::create(WPDC_CORE_CONFIGS_DIR . 'cpt-foo.php'); $this->cpt = new Custom_Post_Type($this->config, $this->post_type); $this->cpt->register(); }
function setUp() { parent::setUp(); global $post; $this->config = Factory::create(WPDC_CORE_CONFIGS_DIR . 'structures/comments.php', Comments::getDefaultsFile()); $post = $this->factory->post->create_and_get(); }
function setUp() { parent::setUp(); $this->config = Factory::create(WPDC_CORE_CONFIGS_DIR . 'structures/post/post-info.php', Post_Info::getDefaultsFile()); $this->author = new WP_User($this->factory->user->create(array('role' => 'editor', 'user_nicename' => 'Tonya', 'display_name' => 'Tonya'))); $post = array('post_author' => $this->author->ID, 'post_status' => 'publish', 'post_content' => rand_str(), 'post_title' => rand_str()); $this->post_id = wp_insert_post($post); }
function setUp() { parent::setUp(); $this->config = Factory::create(WPDC_CORE_CONFIGS_DIR . 'model.php', Model::getDefaultsFile()); $this->meta = (include WPDC_CORE_MOCKS_DIR . 'data/meta.php'); $this->post_id = $this->factory->post->create(); $this->add_meta(); $this->model = new Model($this->config, $this->post_id); }
function setUp() { parent::setUp(); _clean_term_filters(); wp_cache_delete('last_changed', 'terms'); $this->config = Factory::create(WPDC_CORE_CONFIGS_DIR . 'cpt-foo.php'); $this->cpt = new Custom_Post_Type($this->config, $this->post_type); $this->cpt->register(); $this->tax_config = Factory::create(WPDC_CORE_CONFIGS_DIR . 'tax-foo.php'); }
function test_enqueue_scripts() { $foo = Factory::create(WPDC_CORE_CONFIGS_DIR . 'assets/foo.php'); $bar = Factory::create(WPDC_CORE_CONFIGS_DIR . 'assets/bar.php'); $manager = new Manager($this->defaults); $manager->register($foo); $manager->register($bar); $manager->enqueue_scripts(); $this->assertTrue($manager->is_enqueued('foo_js')); $this->assertTrue($manager->is_enqueued('bar_js')); }
function test_create() { $config = Factory::create(WPDC_CORE_CONFIGS_DIR . 'foo.php'); $this->assertInstanceOf('WPDevsClub_Core\\Config\\Arr_Config', $config); }
/** * Load and return the Config object * * @since 1.0.0 * * @param string $config_file Config filename with extension * @param string $path Config path. Defaults to plugin config folder * @returns I_Config Returns the Config object */ function wpdevsclub_load_config($config_file, $path = '') { Factory::create($config_file, $path); }
function setUp() { parent::setUp(); $this->config = Factory::create(WPDC_CORE_CONFIGS_DIR . 'structures/post/post.php', Post::getDefaultsFile()); $this->post_id = $this->factory->post->create(); }
function setUp() { parent::setUp(); $this->config = Factory::create(WPDC_CORE_CONFIGS_DIR . 'shortcode-foo.php'); $this->shortcode = new Shortcode($this->config); }