コード例 #1
0
ファイル: ParserTest.php プロジェクト: crossjoin/browscap
 /**
  * @covers ::getDataVersionHash
  *
  * @throws InvalidArgumentException
  * @throws ParserConditionNotSatisfiedException
  * @throws ParserConfigurationException
  * @throws UnexpectedValueException
  */
 public function testDataVersion()
 {
     $class = new \ReflectionClass('\\Crossjoin\\Browscap\\Parser\\Sqlite\\Parser');
     $method = $class->getMethod('getDataVersionHash');
     $method->setAccessible(true);
     $parser = new Parser();
     $parser2 = new Parser();
     $parser2->setPropertyFilter(new Disallowed(['AolVersion']));
     $dataVersion = $method->invokeArgs($parser, []);
     $dataVersion2 = $method->invokeArgs($parser2, []);
     static::assertNotSame($dataVersion, $dataVersion2);
     static::assertSame(40, strlen($dataVersion));
     static::assertSame(40, strlen($dataVersion2));
 }