/** * @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')); }