Пример #1
0
 public function testRenderMetadata()
 {
     $metadata = ['charset' => 'charsetValue', 'metadataName' => 'metadataValue', 'content_type' => 'content_type_value', 'x_ua_compatible' => 'x_ua_compatible_value', 'media_type' => 'media_type_value'];
     $metadataValueCharset = 'newCharsetValue';
     $expected = '<meta charset="newCharsetValue"/>' . "\n" . '<meta name="metadataName" content="metadataValue"/>' . "\n" . '<meta http-equiv="Content-Type" content="content_type_value"/>' . "\n" . '<meta http-equiv="X-UA-Compatible" content="x_ua_compatible_value"/>' . "\n";
     $this->stringMock->expects($this->at(0))->method('upperCaseWords')->with('charset', '_', '')->willReturn('Charset');
     $this->pageConfigMock->expects($this->once())->method('getCharset')->willReturn($metadataValueCharset);
     $this->pageConfigMock->expects($this->once())->method('getMetadata')->will($this->returnValue($metadata));
     $this->assertEquals($expected, $this->renderer->renderMetadata());
 }