renderVersion() public method

renders the version information
public renderVersion ( array $versionData = [] ) : Browscap\Writer\WriterInterface
$versionData array
return Browscap\Writer\WriterInterface
Beispiel #1
0
 /**
  * tests rendering the version information
  *
  * @group writer
  * @group sourcetest
  */
 public function testRenderVersionIfNotSilentButWithoutVersion()
 {
     $logger = $this->createMock(\Monolog\Logger::class);
     $this->object->setLogger($logger);
     $version = [];
     $this->object->setSilent(false);
     self::assertSame($this->object, $this->object->renderVersion($version));
     self::assertSame('"GJK_Browscap_Version","GJK_Browscap_Version"' . PHP_EOL . '"0",""' . PHP_EOL, file_get_contents($this->file));
 }
Beispiel #2
0
 /**
  * tests rendering the version information
  *
  * @group writer
  * @group sourcetest
  */
 public function testRenderVersionIfNotSilentButWithoutVersion()
 {
     $mockLogger = $this->getMock('\\Monolog\\Logger', array(), array(), '', false);
     $this->object->setLogger($mockLogger);
     $version = array();
     $this->object->setSilent(false);
     self::assertSame($this->object, $this->object->renderVersion($version));
     self::assertSame('"GJK_Browscap_Version","GJK_Browscap_Version"' . PHP_EOL . '"0",""' . PHP_EOL, file_get_contents($this->file));
 }