예제 #1
0
 /**
  *
  * @return \OpenSearch\Core\Registry
  */
 static function instance()
 {
     if (Core\Utils::readyForClient() && Core\Utils::readyToIndex() && Core\Utils::readyForTemplate() && empty(self::$doc)) {
         self::$doc = new Core\Doc();
     }
     if (!isset(self::$instance)) {
         self::$instance = new self();
     }
     return self::$instance;
 }
 public function testReadyToIndex()
 {
     $readyToIndex = Core\Utils::readyToIndex();
     $this->assertEquals(true, $readyToIndex);
 }