Beispiel #1
0
 public function testGetAttr()
 {
     $tag = new \r8\HTML\Tag("hr");
     $this->assertNull($tag->getAttr("rel"));
     $tag->setAttr("rel", "nofollow");
     $this->assertSame("nofollow", $tag->getAttr("rel"));
     try {
         $tag->getAttr("  ");
         $this->fail("An expected exception has not been thrown");
     } catch (\r8\Exception\Argument $err) {
         $this->assertEquals("Must not be empty", $err->getMessage());
     }
 }