renders the version information
public renderVersion ( array $versionData = [] ) : Browscap\Writer\WriterInterface | ||
$versionData | array | |
return | Browscap\Writer\WriterInterface |
/** * 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": {' . PHP_EOL . ' "Version": "0",' . PHP_EOL . ' "Released": ""' . PHP_EOL . ' },' . PHP_EOL, file_get_contents($this->file)); }
/** * 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": {' . PHP_EOL . ' "Version": "0",' . PHP_EOL . ' "Released": ""' . PHP_EOL . ' },' . PHP_EOL, file_get_contents($this->file)); }