/** * @expectedException \LTDBeget\sphinx\informer\exceptions\InformerRuntimeException * @expectedExceptionMessage Sphinx of version 2.1.9 does't have section common */ public function testUnknownSection() { /** @noinspection ExceptionsAnnotatingAndHandlingInspection */ $informer = Informer::get(eVersion::V_2_1_9()); /** @noinspection ExceptionsAnnotatingAndHandlingInspection */ $informer->getOptionInfo(eSection::COMMON(), eCommonOption::JSON_AUTOCONV_KEYNAMES()); }
/** * @return Common * @throws \LTDBeget\sphinx\configurator\exceptions\ConfigurationException */ public function getCommon() : Common { $section = eSection::COMMON(); if (!$this->isAllowedSection($section)) { throw new ConfigurationException("Sphinx of version {$this->version} does't have section {$section}"); } if (!$this->isHasCommon()) { $this->initCommon(); } return $this->common; }