Skip to content

Commit

Permalink
DOMDocument - added missing properties
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed Jan 15, 2017
1 parent e5b2f6a commit 45a41ad
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,14 @@ class PhpDefectClassReflectionExtension implements PropertiesClassReflectionExte
'days' => 'mixed',
],
'DOMDocument' => [
'actualEncoding' => 'string',
'config' => 'DOMConfiguration',
'doctype' => 'DOMDocumentType',
'documentElement' => 'DOMElement',
'documentURI' => 'string',
'encoding' => 'string',
'formatOutput' => 'bool',
'implementation' => 'bool',
'implementation' => 'DOMImplementation',
'preserveWhiteSpace' => 'bool',
'recover' => 'bool',
'resolveExternals' => 'bool',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public function testProperties(string $className, string $declaringClassName, ar
foreach ($data as $propertyName => $typeDescription) {
$broker = $this->getContainer()->getByType(Broker::class);
$classReflection = $broker->getClass($className);
$this->assertTrue($classReflection->hasProperty($propertyName));
$this->assertTrue($classReflection->hasProperty($propertyName), sprintf('%s::$%s', $className, $propertyName));
$propertyReflection = $classReflection->getProperty($propertyName);
$this->assertInstanceOf(PhpDefectPropertyReflection::class, $propertyReflection);
$this->assertSame($declaringClassName, $propertyReflection->getDeclaringClass()->getName());
Expand Down Expand Up @@ -71,10 +71,14 @@ public function dataDomDocumentProperties(): array
\DOMDocument::class,
\DOMDocument::class,
[
'actualEncoding' => 'string',
'config' => 'DOMConfiguration',
'doctype' => 'DOMDocumentType',
'documentElement' => 'DOMElement',
'documentURI' => 'string',
'encoding' => 'string',
'formatOutput' => 'bool',
'implementation' => 'bool',
'implementation' => 'DOMImplementation',
'preserveWhiteSpace' => 'bool',
'recover' => 'bool',
'resolveExternals' => 'bool',
Expand All @@ -84,6 +88,7 @@ public function dataDomDocumentProperties(): array
'validateOnParse' => 'bool',
'version' => 'string',
'xmlEncoding' => 'string',
'xmlStandalone' => 'bool',
'xmlVersion' => 'string',
],
],
Expand Down

0 comments on commit 45a41ad

Please sign in to comment.