public function setUp()
 {
     parent::setUp();
     $this->editor_id = $this->factory->user->create(array('role' => 'editor'));
     $this->author_id = $this->factory->user->create(array('role' => 'author'));
     $this->has_setup_template = false;
 }
 public function setUp()
 {
     parent::setUp();
     $this->post_id = $this->factory->post->create();
     $this->editor_id = $this->factory->user->create(array('role' => 'editor'));
     $this->author_id = $this->factory->user->create(array('role' => 'author'));
     $this->contributor_id = $this->factory->user->create(array('role' => 'contributor'));
     register_post_type('youseeme', array('supports' => array(), 'show_in_rest' => true));
 }
 public function setUp()
 {
     parent::setUp();
     $this->editor_id = $this->factory->user->create(array('role' => 'editor'));
     $this->author_id = $this->factory->user->create(array('role' => 'author'));
     $this->contributor_id = $this->factory->user->create(array('role' => 'contributor'));
     $orig_file = dirname(__FILE__) . '/data/canola.jpg';
     $this->test_file = '/tmp/canola.jpg';
     copy($orig_file, $this->test_file);
 }
 public function setUp()
 {
     parent::setUp();
     $this->has_setup_template = false;
     add_filter('theme_page_templates', array($this, 'filter_theme_page_templates'));
     // reregister the route as we now have a template available.
     $GLOBALS['wp_rest_server']->override_by_default = true;
     $controller = new WP_REST_Posts_Controller('page');
     $controller->register_routes();
     $GLOBALS['wp_rest_server']->override_by_default = false;
 }
 public function setUp()
 {
     parent::setUp();
     // Add an uploader role to test upload capabilities.
     add_role('uploader', 'File upload role');
     $role = get_role('uploader');
     $role->add_cap('upload_files');
     $role->add_cap('read');
     $role->add_cap('level_0');
     $orig_file = DIR_TESTDATA . '/images/canola.jpg';
     $this->test_file = '/tmp/canola.jpg';
     copy($orig_file, $this->test_file);
     $orig_file2 = DIR_TESTDATA . '/images/codeispoetry.png';
     $this->test_file2 = '/tmp/codeispoetry.png';
     copy($orig_file2, $this->test_file2);
 }
 public function setUp()
 {
     parent::setUp();
     register_post_type('youseeme', array('supports' => array(), 'show_in_rest' => true));
 }
 public function setUp()
 {
     parent::setUp();
     $this->has_setup_template = false;
     add_filter('theme_page_templates', array($this, 'filter_theme_page_templates'));
 }