示例#1
0
 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'));
 }
示例#2
0
 /**
  * @return bool
  */
 public function isRequired()
 {
     return !$this->element->hasAttribute('default') && !$this->element->hasAttribute('constant');
 }