Ejemplo n.º 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, 'nillable' => 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->isNillable('squibble'));
 }