/**
  */
 public function testGetShapesAsJson()
 {
     $exercise = new MatchPictureInPictureExercise();
     // inactive shape
     $mockShape = $this->getMock('_OurBrand_\\Quiz\\Domain\\Model\\Exercises\\MatchPictureShape', array('getImageSrc', 'getType', 'getActive'));
     $mockShape->expects($this->any())->method('getImageSrc')->will($this->returnValue('mocked src'));
     $mockShape->expects($this->any())->method('getType')->will($this->returnValue('image'));
     $mockShape->expects($this->any())->method('getActive')->will($this->returnValue(false));
     $this->assertNull($exercise->addShape($mockShape), 'addShape()');
     // active shape
     $mockShape = $this->getMock('_OurBrand_\\Quiz\\Domain\\Model\\Exercises\\MatchPictureShape', array('getImageSrc', 'getType', 'getActive'));
     $mockShape->expects($this->any())->method('getImageSrc')->will($this->returnValue('mocked src'));
     $mockShape->expects($this->any())->method('getType')->will($this->returnValue('image'));
     $mockShape->expects($this->any())->method('getActive')->will($this->returnValue(true));
     $this->assertNull($exercise->addShape($mockShape), 'addShape()');
     $this->assertStringStartsWith('[{', $exercise->getShapesAsJson(true), 'returned string must start with [{');
     $this->assertStringEndsWith('}]', $exercise->getShapesAsJson(true), 'returned string must end with }]');
 }