public function testSettingAttributeValueWithEntitiesAndKeepEntitiesEnabledDoesNotEncode() { $attr = $this->node->setAttribute('test', '&', true); $this->assertTrue($this->node->hasAttribute('test')); $this->assertInstanceOf('DOMAttr', $attr); $this->assertEquals('&', $this->node->getAttribute('test')); }
/** * @return bool */ public function isRequired() { return !$this->element->hasAttribute('default') && !$this->element->hasAttribute('constant'); }