getTypeOfField() 공개 메소드

Gets the type of a field.
public getTypeOfField ( string $fieldName ) : string
$fieldName string
리턴 string
예제 #1
0
 /**
  * @test
  */
 public function itShouldMapProperly()
 {
     $class = new ClassMetadataInfo('Doctrine\\Tests\\OXM\\Mapping\\Entity');
     $this->assertEquals('Doctrine\\Tests\\OXM\\Mapping\\Entity', $class->getName());
     $class->mapField(array('fieldName' => 'squibble', 'type' => 'string', 'required' => true, 'direct' => true, 'id' => true, 'collection' => false, 'nullable' => false, 'getMethod' => 'getSquibble', 'setMethod' => 'setSquibble'));
     $this->assertTrue($class->hasField('squibble'));
     $this->assertEquals('string', $class->getTypeOfField('squibble'));
     $this->assertTrue($class->isRequired('squibble'));
     $this->assertTrue($class->isDirect('squibble'));
     $this->assertFalse($class->isCollection('squibble'));
     $this->assertFalse($class->isNullable('squibble'));
 }