Beispiel #1
0
 public function testAttrExists()
 {
     $tag = new \r8\HTML\Tag("hr");
     $this->assertFalse($tag->attrExists("class"));
     $tag->setAttr("class", "title");
     $this->assertTrue($tag->attrExists("class"));
     try {
         $tag->attrExists("  ");
         $this->fail("An expected exception has not been thrown");
     } catch (\r8\Exception\Argument $err) {
         $this->assertEquals("Must not be empty", $err->getMessage());
     }
 }