public function supports($object, $graph = 'default')
{
$reflection = new \ReflectionClass($this->config['class']);
return $reflection->isInstance($object) && $graph === $this->config['graph'];
}
public function testSupports() { $object = $this->getMock('Finite\\StatefulInterface', array(), array(), 'Stateful1'); $object2 = $this->getMock('Finite\\StatefulInterface', array(), array(), 'Stateful2'); $this->assertTrue($this->object->supports($object)); $this->assertFalse($this->object->supports($object2)); }