public function testHasAttribute() { $el = new Element(['onClick' => 'alert("ok")']); $this->assertTrue($el->hasAttribute('onClick')); $this->assertTrue($el->hasAttribute('onclick')); $this->assertEquals('<div onclick="alert("ok")"></div>', (string) $el); }