Example #1
0
 /**
  * @return bool
  */
 public function isDistributed() : bool
 {
     $indexWithoutSource = false;
     foreach ($this->iterateOptions() as $option) {
         if ($option->getName()->is(eIndexOption::TYPE()) && $option->getValue() === 'distributed') {
             $indexWithoutSource = true;
         }
     }
     return $indexWithoutSource;
 }
 /**
  * @expectedException \LTDBeget\sphinx\informer\exceptions\InformerRuntimeException
  * @expectedExceptionMessage For sphinx v. 2.2.10 option charset_type in index isn't available
  */
 public function testAddPermanentlyRemovedOption()
 {
     /** @noinspection ExceptionsAnnotatingAndHandlingInspection */
     $index = (new Configuration(eVersion::V_2_2_10()))->addIndex('valid_name');
     /** @noinspection ExceptionsAnnotatingAndHandlingInspection */
     $index->addOption(eIndexOption::CHARSET_TYPE(), "utf-8");
 }