public function testReversedManyToOneAssociationWorks() { $testCase = new TestsCases\BaseTestCase(); $associatedTestCase = new TestsCases\AssociationTestCase(); $testCase->addInvertedReversedManyToOnePropertyItem(new TestsCases\AssociationTestCase()); $testCase->addInvertedReversedManyToOnePropertyItem($associatedTestCase); $this->assertEquals($testCase, $associatedTestCase->getMappedReversedManyToOneProperty()); $testCase->removeInvertedReversedManyToOnePropertyItem($associatedTestCase); $this->assertEquals(null, $associatedTestCase->getMappedReversedManyToOneProperty()); $this->assertEquals(1, count($testCase->getInvertedReversedManyToOnePropertyItems())); $associatedTestCase->setMappedReversedManyToOneProperty($testCase); $this->assertEquals(2, count($testCase->getInvertedReversedManyToOnePropertyItems())); $associatedTestCase->setMappedReversedManyToOneProperty(null); $this->assertEquals(1, count($testCase->getInvertedReversedManyToOnePropertyItems())); }