public function testIsTypeEqual() { $expectedType = ClassMetadataInfo::ONE_TO_MANY; $this->doctrineMetadata->set('type', $expectedType); $this->assertTrue($this->doctrineMetadata->isTypeEqual($expectedType)); $this->assertFalse($this->doctrineMetadata->isTypeEqual(ClassMetadataInfo::ONE_TO_ONE)); }
/** * Checks if association is inverse and related to one entity * * @param DoctrineMetadata $metadata * @return bool */ protected function isAssociationTypeToOne(DoctrineMetadata $metadata) { return $metadata->isManyToOne() || $metadata->isOneToOne(); }