/** */ public function testSetShapes() { $mockShape = $this->getMock('_OurBrand_\\Quiz\\Domain\\Model\\Exercises\\MatchPictureInPictureShape'); $mockShape->expects($this->any())->method('getX')->will($this->returnValue(666)); $collection = new \Doctrine\Common\Collections\ArrayCollection(); $collection->add($mockShape); $exercise = new MatchPictureInPictureExercise(); $exercise->setShapes($collection); $this->assertCount(1, $exercise->getShapes()); }