Skip to content

Commit

Permalink
#167 - don't skip tests depending on Closure::bind() support (assum…
Browse files Browse the repository at this point in the history
…ing it as of PHP 5.4)
  • Loading branch information
Ocramius committed Dec 14, 2014
1 parent 2b271b8 commit 1cfc752
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,6 @@ public function testBodyStructureWithProtectedProperties()

public function testBodyStructureWithPrivateProperties()
{
if (! method_exists('Closure', 'bind')) {
$this->setExpectedException('ProxyManager\Exception\UnsupportedProxiedClassException');
}

$method = new BindProxyProperties(
new ReflectionClass('ProxyManagerTestAsset\\ClassWithPrivateProperties'),
$this->prefixInterceptors,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,6 @@ public function testBodyStructureWithProtectedProperties()
*/
public function testBodyStructureWithPrivateProperties()
{
if (! method_exists('Closure', 'bind')) {
$this->setExpectedException('ProxyManager\Exception\UnsupportedProxiedClassException');
}

$constructor = new Constructor(
new ReflectionClass('ProxyManagerTestAsset\\ClassWithPrivateProperties'),
$this->prefixInterceptors,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,12 @@ public function testGeneratesValidCode($className)
// @todo interfaces *may* be proxied by deferring property localization to the constructor (no hardcoding)
$this->setExpectedException('ProxyManager\Exception\InvalidProxiedClassException');

return parent::testGeneratesValidCode($className);
}
parent::testGeneratesValidCode($className);

if ((! method_exists('Closure', 'bind'))
&& $reflectionClass->getProperties(ReflectionProperty::IS_PRIVATE)
) {
$this->setExpectedException('ProxyManager\Exception\UnsupportedProxiedClassException');
return;
}

return parent::testGeneratesValidCode($className);
parent::testGeneratesValidCode($className);
}

/**
Expand Down

0 comments on commit 1cfc752

Please sign in to comment.