/** * {@inheritDoc} */ public function removeGradingType(\Doctrine\Common\Collections\Collection $gradingTypes) { $this->__initializer__ && $this->__initializer__->__invoke($this, 'removeGradingType', array($gradingTypes)); return parent::removeGradingType($gradingTypes); }
/** * @covers Core\Entity\Module::addGradingType * @covers Core\Entity\Module::removeGradingType */ public function testAddRemoveGradingType() { $ml = new Module(); $this->assertEquals(0, $ml->getGradingType()->count()); $mockGradingType = $this->getMockBuilder('Core\\Entity\\GradingType')->getMock(); $gradingtypes = new \Doctrine\Common\Collections\ArrayCollection(); $gradingtypes->add($mockGradingType); $ml->addGradingType($gradingtypes); $this->assertEquals(1, $ml->getGradingType()->count()); $this->assertEquals($mockGradingType, $ml->getGradingType()->first()); $ml->removeGradingType($gradingtypes); $this->assertEquals(0, $ml->getGradingType()->count()); }