addEnginesFile() 공개 메소드

Load a engines.json file and parse it into the platforms data array
public addEnginesFile ( string $src ) : DataCollection
$src string Name of the file
리턴 DataCollection
예제 #1
0
 /**
  * tests getting an existing engine
  *
  * @group data
  * @group sourcetest
  */
 public function testGetEngine()
 {
     $this->object->addEnginesFile($this->getEngineJsonFixture());
     self::assertInternalType('array', $this->object->getEngines());
     $engine = $this->object->getEngine('Foobar');
     self::assertInstanceOf('\\Browscap\\Data\\Engine', $engine);
     $properties = $engine->getProperties();
     self::assertInternalType('array', $properties);
     self::assertArrayHasKey('RenderingEngine_Name', $properties);
     self::assertSame('Foobar', $properties['RenderingEngine_Name']);
 }