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'));
 }
 public function testGetTranslationDomain()
 {
     $description = new FieldDescription();
     $admin = $this->getMock('Sonata\\AdminBundle\\Admin\\AdminInterface');
     $description->setAdmin($admin);
     $admin->expects($this->once())->method('getTranslationDomain')->will($this->returnValue('AdminDomain'));
     $this->assertEquals('AdminDomain', $description->getTranslationDomain());
     $admin->expects($this->never())->method('getTranslationDomain');
     $description->setOption('translation_domain', 'ExtensionDomain');
     $this->assertEquals('ExtensionDomain', $description->getTranslationDomain());
 }