public function testGetTotalPublishedPosts()
 {
     $result = Settings::getTotalPublishedPosts();
     $postsTypesToIndex = array_keys(Core\FieldsHelper::getPostTypesToIndex());
     $totals = array();
     foreach ($postsTypesToIndex as $type) {
         $countByType = wp_count_posts($type);
         $totals[$type] = 0;
         foreach ($countByType as $postStatus => $count) {
             if ('publish' === $postStatus) {
                 $totals[$type] += $count;
             }
         }
         $this->assertEquals($result[$type], $totals[$type]);
     }
 }
 public function testLoadFile()
 {
     $registry = Core\Registry::instance();
     $settings = Controllers\Settings::instance();
     $indexer = Controllers\Indexer::instance();
     $doc = new Core\Doc();
     $search = new Core\Search();
     $this->assertTrue(class_exists('Registry'));
     $this->assertTrue(class_exists('Settings'));
     $this->assertTrue(class_exists('Indexer'));
     $this->assertTrue(class_exists('Doc'));
     $this->assertTrue(class_exists('Search'));
     $this->assertTrue(class_exists('CloudsearchClient'));
     $this->assertTrue(class_exists('CloudsearchDoc'));
     $this->assertTrue(class_exists('CloudsearchSearch'));
 }