Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 3d1d5ba1a4
Fetching contributors…

Cannot retrieve contributors at this time

32 lines (26 sloc) 0.577 kb
<?php
namespace mageekguy\atoum\asserters;
use
mageekguy\atoum,
mageekguy\atoum\exceptions
;
class afterDestructionOf extends atoum\asserter
{
public function setWith($value)
{
if (is_object($value) === false)
{
$this->fail(sprintf($this->getLocale()->_('%s is not an object'), $this->getTypeOf($value)));
}
else if (method_exists($value, '__destruct') === false)
{
$this->fail(sprintf($this->getLocale()->_('Destructor of class %s is undefined'), get_class($value)));
}
else
{
$value->__destruct();
$this->pass();
}
return $this;
}
}
Jump to Line
Something went wrong with that request. Please try again.