/**
  * @since 1.2.0
  *
  * @param DefinitionReader $definitionReader
  * @param MessageCache $messageCache
  */
 protected function __construct(DefinitionReader $definitionReader, MessageCache $messageCache)
 {
     $this->definitions = $definitionReader->getDefinitions();
     $this->messageCache = $messageCache;
     $this->messageCache->setCacheTimeOffset($definitionReader->getModificationTime());
 }
 public function testMalformedJsonFileThrowsException()
 {
     $this->setExpectedException('UnexpectedValueException');
     $instance = new DefinitionReader(__DIR__ . '/../Fixture/malformed.json');
     $instance->getDefinitions();
 }
 public function testRegisterAsFixedTablesWithNonExifProperties()
 {
     PropertyRegistry::clear();
     $definitionReader = new DefinitionReader();
     $definitions = $definitionReader->getDefinitions();
     $this->assertTrue(isset($definitions['_EXIF']));
     unset($definitions['_EXIF']);
     $expectedCount = count(array_keys($definitions));
     $tableDefinitions = array();
     $configuration = array('sespUseAsFixedTables' => true, 'sespSpecialProperties' => array('_CUSER', '_EUSER', '_REVID', '_PAGEID', '_VIEWS', '_NREV', '_NTREV', '_SUBP', '_USERREG', '_USEREDITCNT', '_EXIFDATA', '_MEDIATYPE', '_MIMETYPE', '_SHORTURL'));
     PropertyRegistry::getInstance()->registerAsFixedTables($tableDefinitions, $configuration);
     $this->assertCount($expectedCount, $tableDefinitions);
 }