Admin_Action_Index_Delete_Test::testActionPerform PHP Метод

testActionPerform() публичный Метод

public testActionPerform ( )
    public function testActionPerform()
    {
        $remote_id = uniqid();
        $api = $this->prophet->prophesize('\\Apple_Push_API\\API');
        $api->delete_article($remote_id)->shouldBeCalled();
        // Create post with dummy remote id
        $post_id = $this->factory->post->create();
        update_post_meta($post_id, 'apple_news_api_id', $remote_id);
        $action = new Delete($this->settings, $post_id);
        $action->set_api($api->reveal());
        $action->perform();
        $this->assertNotEquals(null, get_post_meta($post_id, 'apple_news_api_deleted', true));
        $this->assertEquals(null, get_post_meta($post_id, 'apple_news_api_id', true));
    }