public function testQuestionWithoutCommaWithSpace()
 {
     $sng = new SpellingAndGrammarCommaQuestion();
     $question = ' aaa ';
     $this->assertNull($sng->setQuestionWithoutComma($question));
     $this->assertSame('aaa', $sng->getQuestionWithoutComma());
 }
 /**
  * @dataProvider readyForCompletionDataProvider
  * @param array $data1
  * @param array $data2
  * @param integer $expected
  */
 public function testGetReadyForCompletion($data1, $data2, $expected)
 {
     $exercise = new SpellingAndGrammarCommaExercise();
     if (!empty($data1)) {
         $exercise->setTitle($data1['title']);
         $exercise->setDescription($data1['description']);
     }
     if (!empty($data2)) {
         foreach ($data2 as $row) {
             $question = new SpellingAndGrammarCommaQuestion();
             $question->setQuestionWithComma($row['questionWithComma']);
             $question->setQuestionWithoutComma($row['questionWithoutComma']);
             $exercise->addQuestion($question);
         }
     }
     $this->assertSame($expected, $exercise->getReadyForCompletion());
 }