public function testGetType() { $type = new FooType(); $resolvedType = $this->getMockResolvedType(); $resolvedType->expects($this->once())->method('getInnerType')->will($this->returnValue($type)); $this->registry->expects($this->once())->method('getType')->with('name')->will($this->returnValue($resolvedType)); $this->assertEquals($type, $this->factory->getType('name')); }
public function testGetType() { $type = new FooType(); $resolvedType = $this->getMockResolvedType(); $resolvedType->expects($this->once())->method('getInnerType')->will($this->returnValue($type)); $this->registry->expects($this->once())->method('getType')->with('name')->will($this->returnValue($resolvedType)); set_error_handler(array('Symfony\\Component\\Form\\Test\\DeprecationErrorHandler', 'handle')); $this->assertEquals($type, $this->factory->getType('name')); restore_error_handler(); }