public function testGetFieldValueMagicCall() { $parameters = array('foo', 'bar'); $foo = new FooCall(); $description = new FieldDescription(); $description->setOption('parameters', $parameters); $this->assertEquals(array('inexistantMethod', $parameters), $description->getFieldValue($foo, 'inexistantMethod')); }
/** * @expectedException Sonata\AdminBundle\Exception\NoValueException */ public function testGetValueNoValueException() { $description = new FieldDescription(); $mock = $this->getMock('stdClass', array('getFoo')); $description->getFieldValue($mock, 'fake'); }