hasType() public method

Returns whether the given type is supported.
Deprecation: Deprecated since version 2.1, to be removed in 2.3. Use {@link FormRegistryInterface::hasType()} instead.
public hasType ( string $name ) : boolean
$name string The name of the type
return boolean Whether the type is supported
 public function testHasType()
 {
     $this->registry->expects($this->once())->method('hasType')->with('name')->will($this->returnValue('RESULT'));
     set_error_handler(array('Symfony\\Component\\Form\\Test\\DeprecationErrorHandler', 'handle'));
     $this->assertSame('RESULT', $this->factory->hasType('name'));
     restore_error_handler();
 }
Beispiel #2
0
 public function testHasType()
 {
     $this->registry->expects($this->once())->method('hasType')->with('name')->will($this->returnValue('RESULT'));
     $this->assertSame('RESULT', $this->factory->hasType('name'));
 }