/**
  * @dataProvider shapesDataProvider
  * @param $shapeArray
  * @param $assertions
  */
 public function testPostClone($shapeArray, $assertions)
 {
     $exercise = new MatchPictureInPictureExercise();
     $this->assertNull($exercise->addShapesFromArray($shapeArray));
     // mainImage
     $mockMainImage = $this->getMock('_OurBrand_\\Quiz\\Domain\\Model\\Exercises\\MatchPictureInPictureMainImage');
     $collection = new \Doctrine\Common\Collections\ArrayCollection();
     $collection->add($mockMainImage);
     $exercise->setMainImageCollection($collection);
     $mockImage = $this->getMock('\\_OurBrand_\\Quiz\\Domain\\Model\\ImageResource', array('clear'));
     $mockMainImage->expects($this->any())->method('clear')->will($this->returnValue(null));
     $this->assertNull($exercise->addMainImage($mockImage), 'addMainImage() must have an imageResource object given');
     // shapes
     $mockShape = $this->getMock('_OurBrand_\\Quiz\\Domain\\Model\\Exercises\\MatchPictureShape', array('getImageSrc', 'getType', 'getActive'));
     $this->assertNull($exercise->addShape($mockShape), 'addShape()');
     // active shape
     $mockShape = $this->getMock('_OurBrand_\\Quiz\\Domain\\Model\\Exercises\\MatchPictureShape', array('getImageSrc', 'getType', 'getActive'));
     $this->assertNull($exercise->addShape($mockShape), 'addShape()');
     $exerciseClone = clone $exercise;
     $this->assertNull($exerciseClone->postClone(), '$clone->postClone()');
     // check that the cloned data are the same
     // Test mainImage
     $this->assertCount(count($exercise->getMainImageCollection()), $exerciseClone->getMainImageCollection(), 'cloned getMainImageCollection() does not match');
     // Test shapes
     $this->assertCount(count($exercise->getShapes()), $exerciseClone->getShapes(), 'cloned getShapes() does not match');
 }