BrowscapTest\Writer\JsonWriterTest::testRenderVersionIfNotSilent PHP Method

testRenderVersionIfNotSilent() public method

tests rendering the version information
    public function testRenderVersionIfNotSilent()
    {
        $logger = $this->createMock(\Monolog\Logger::class);
        $this->object->setLogger($logger);
        $version = ['version' => 'test', 'released' => date('Y-m-d'), 'format' => 'TEST', 'type' => 'full'];
        $this->object->setSilent(false);
        self::assertSame($this->object, $this->object->renderVersion($version));
        self::assertSame('  "GJK_Browscap_Version": {' . PHP_EOL . '    "Version": "test",' . PHP_EOL . '    "Released": "' . date('Y-m-d') . '"' . PHP_EOL . '  },' . PHP_EOL, file_get_contents($this->file));
    }