public function testIsManyToOne() { $this->assertFalse($this->doctrineMetadata->isManyToOne()); $this->doctrineMetadata->set('type', ClassMetadataInfo::MANY_TO_ONE); $this->assertTrue($this->doctrineMetadata->isManyToOne()); }
/** * 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(); }