Skip to content
This repository has been archived by the owner on Feb 22, 2021. It is now read-only.

Commit

Permalink
PHP 5.3 support
Browse files Browse the repository at this point in the history
  • Loading branch information
norberttech committed May 8, 2014
1 parent f20afb7 commit cbb014b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Coduo/PhpSpec/Listener/DataProviderListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function beforeSpecification(SpecificationEvent $event)
return false;
}

$subject = $example->getSpecification()->getClassReflection()->newInstanceWithoutConstructor();
$subject = $example->getSpecification()->getClassReflection()->newInstance();
$providedData = $example->getSpecification()->getClassReflection()->getMethod($dataProviderMethod)->invoke($subject);

if (is_array($providedData)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ private function haveValidDataProvider(ExampleNode $example)
return false;
}

$subject = $example->getSpecification()->getClassReflection()->newInstanceWithoutConstructor();
$subject = $example->getSpecification()->getClassReflection()->newInstance();
$providedData = $example->getSpecification()->getClassReflection()->getMethod($dataProviderMethod)->invoke($subject);

if (!is_array($providedData)) {
Expand Down Expand Up @@ -110,7 +110,7 @@ private function getDataFromProvider(ExampleNode $example)
return array();
}

$subject = $example->getSpecification()->getClassReflection()->newInstanceWithoutConstructor();
$subject = $example->getSpecification()->getClassReflection()->newInstance();
$providedData = $example->getSpecification()->getClassReflection()->getMethod($dataProviderMethod)->invoke($subject);

return (is_array($providedData)) ? $providedData : array();
Expand Down

0 comments on commit cbb014b

Please sign in to comment.