Beispiel #1
0
 /**
  * @group ZF-9743
  */
 public function testPropertyIsNotSupportedByDefaultDoctype()
 {
     try {
         $this->helper->headMeta('foo', 'og:title', 'property');
         $this->fail('meta property attribute should not be supported on default doctype');
     } catch (Zend_View_Exception $e) {
         $this->assertContains('Invalid value passed', $e->getMessage());
     }
 }
Beispiel #2
0
 public function testStringRepresentationReflectsDoctype()
 {
     $this->view->doctype('HTML4_STRICT');
     $this->helper->headMeta('some content', 'foo');
     $test = $this->helper->toString();
     $this->assertNotContains('/>', $test);
     $this->assertContains('some content', $test);
     $this->assertContains('foo', $test);
 }
 public function testHeadMetaHelperCreatesItemEntry()
 {
     $this->helper->headMeta('foo', 'keywords');
     $values = $this->helper->getArrayCopy();
     $this->assertEquals(1, count($values));
     $item = array_shift($values);
     $this->assertEquals('foo', $item->content);
     $this->assertEquals('name', $item->type);
     $this->assertEquals('keywords', $item->name);
 }
Beispiel #4
0
 /**
  * @group ZF-11910
  */
 public function testStandaloneInstantiationWithoutViewDoesNotCauseFatalError()
 {
     $expected = '<meta name="foo" content="bar" />';
     $helper = new Zend_View_Helper_HeadMeta();
     $result = (string) $helper->headMeta()->appendName('foo', 'bar');
     $this->assertEquals($expected, $result);
 }