/** * @group get_settings_posts_cache */ public function test_get_settings_posts_cache() { $post_id = $this->factory->post->create(array('post_type' => SCF_Config::NAME, 'post_title' => 'test_settings_post')); update_post_meta($post_id, SCF_Config::PREFIX . 'condition', array('post')); $settings_posts = SCF::get_settings_posts(get_post($this->post_id)); $settings_posts_cache = SCF::get_settings_posts_cache(get_post($this->post_id)); $this->assertCount(1, $settings_posts_cache); foreach ($settings_posts_cache as $settings_post) { $this->assertEquals('test_settings_post', $settings_post->post_title); } }