Exemplo n.º 1
0
 public function testGetAssociationAdmin()
 {
     $adminMock = $this->getMockBuilder('Sonata\\AdminBundle\\Admin\\Admin')->disableOriginalConstructor()->getMock();
     $adminMock->expects($this->once())->method('setParentFieldDescription')->with($this->isInstanceOf('Sonata\\AdminBundle\\Admin\\FieldDescriptionInterface'));
     $field = new FieldDescription();
     $field->setAssociationAdmin($adminMock);
     $this->assertSame($adminMock, $field->getAssociationAdmin());
 }