/** * Test filter_post_type_link. * * @covers CustomizeSnapshots\Post_Type::filter_post_type_link() */ function test_filter_post_type_link() { $post_type = new Post_Type($this->plugin->customize_snapshot_manager); $post_id = $post_type->save(array('uuid' => self::UUID, 'data' => array('blogname' => array('value' => 'Hello')))); $this->assertContains('customize_snapshot_uuid=' . self::UUID, $post_type->filter_post_type_link('', get_post($post_id))); remove_all_filters('post_type_link'); $post_type->register(); $this->assertContains('customize_snapshot_uuid=' . self::UUID, get_permalink($post_id)); }