BrowscapTest\Writer\XmlWriterTest::testRenderVersionIfNotSilentButWithoutVersion PHP Method

testRenderVersionIfNotSilentButWithoutVersion() public method

tests rendering the version information
    public function testRenderVersionIfNotSilentButWithoutVersion()
    {
        $logger = $this->createMock(\Monolog\Logger::class);
        $this->object->setLogger($logger);
        $version = [];
        $this->object->setSilent(false);
        $mockFormatter = $this->getMockBuilder(\Browscap\Formatter\XmlFormatter::class)->disableOriginalConstructor()->setMethods(['formatPropertyName'])->getMock();
        $mockFormatter->expects(self::exactly(2))->method('formatPropertyName')->will(self::returnValue('test'));
        self::assertSame($this->object, $this->object->setFormatter($mockFormatter));
        self::assertSame($this->object, $this->object->renderVersion($version));
        self::assertSame('<gjk_browscap_version>' . PHP_EOL . '<item name="Version" value="test"/>' . PHP_EOL . '<item name="Released" value="test"/>' . PHP_EOL . '</gjk_browscap_version>' . PHP_EOL, file_get_contents($this->file));
    }