public function setUp() { parent::setUp(); update_option('wpghs_repository', 'owner/repo'); $this->id = $this->factory->post->create(); $this->post = get_post($this->id); $this->fetch->shouldReceive('repository')->andReturn('owner/repo'); }
public function setUp() { global $post; parent::setUp(); $post = $this->factory->post->create_and_get(); $this->post = new WordPress_GitHub_Sync_Post($post->ID, $this->api); $this->fetch->shouldReceive('repository')->andReturn('owner/repo'); }
public function setUp() { parent::setUp(); $this->secret = '1234567890qwertyuiopasdfghjklzxcvbnm'; update_option('wpghs_secret', $this->secret); $this->request = new WordPress_GitHub_Sync_Request_Stub($this->app); $this->request->set_data_dir($this->data_dir); }
public function setUp() { parent::setUp(); $this->controller = new WordPress_GitHub_Sync_Controller($this->app); $this->semaphore->shouldReceive('is_open')->once()->andReturn(true)->byDefault(); $this->semaphore->shouldReceive('lock')->once()->byDefault(); $this->semaphore->shouldReceive('unlock')->once()->byDefault(); }
public function setUp() { parent::setUp(); WP_HTTP_TestCase::init(); update_option('wpghs_repository', self::REPO_OPTION_VALUE); update_option('wpghs_oauth_token', self::TOKEN_OPTION_VALUE); update_option('wpghs_host', self::HOST_OPTION_VALUE); $this->http_responder = array($this, 'mock_github_api'); }
public function tearDown() { parent::tearDown(); unlink(self::TMP_LOG); }
public function setUp() { parent::setUp(); $this->semaphore = new WordPress_GitHub_Sync_Semaphore($this->app); }
public function setUp() { parent::setUp(); $this->fetch->shouldReceive('repository')->once()->andReturn('owner/repo')->byDefault(); }
public function setUp() { parent::setUp(); $this->import = new WordPress_GitHub_Sync_Import($this->app); }
public function setUp() { parent::setUp(); $this->database = new WordPress_GitHub_Sync_Database($this->app); register_post_type('gistpen', array()); }
public function setUp() { parent::setUp(); $this->api = new WordPress_GitHub_Sync_Api($this->app); }
public function tearDown() { parent::tearDown(); $this->assertFalse(get_option('_wpghs_api_cache')); }
public function setUp() { parent::setUp(); $this->export = new WordPress_GitHub_Sync_Export($this->app); $this->post->shouldReceive('status')->andReturn('publish'); }