/** * @param \_OurBrand_\Quiz\Domain\Model\Exercises\SpellingAndGrammarCommaQuestion $question */ public function addQuestion($question) { $question->setExercise($this); $question->setNumber(count($this->questions)); $this->questions->add($question); $this->maxScore = count($this->questions); }
public function testGetNumber() { $sng = new SpellingAndGrammarCommaQuestion(); $number = 1; $this->assertNull($sng->setNumber($number)); $this->assertSame($number, $sng->getNumber()); }