public function testReversedManyToManyAssociationWorks() { $testCase = new TestsCases\BaseTestCase(); $associatedTestCase = new TestsCases\AssociationTestCase(); $testCase->addMappedReversedManyToManyPropertyItem($associatedTestCase); $this->assertEquals($testCase, $associatedTestCase->getMappedReversedManyToManyPropertyItems()[0]); $testCase->addMappedReversedManyToManyPropertyItem(new TestsCases\AssociationTestCase()); $testCase->removeMappedReversedManyToManyPropertyItem($associatedTestCase); $this->assertEquals(0, count($associatedTestCase->getMappedReversedManyToManyPropertyItems())); $associatedTestCase->addMappedReversedManyToManyPropertyItem($testCase); $this->assertEquals(2, count($testCase->getMappedReversedManyToManyPropertyItems())); $associatedTestCase->removeMappedReversedManyToManyPropertyItem($testCase); $this->assertEquals(1, count($testCase->getMappedReversedManyToManyPropertyItems())); }