public function testCantSetAttributesForInputBeforeTypeHasBeenSet() { $el = new HTMLElement('input'); $this->setExpectedException('\\lib\\InvalidElementException'); $el->setAttribute('class', 'testClass'); $this->assertTrue($el->hasErrors()); }