Beispiel #1
0
 public function closing()
 {
     $closing = new HWLDFWordAccumulator();
     foreach ($this->edits as $edit) {
         if ($edit->type == 'copy') {
             $closing->addWords($edit->closing);
         } elseif ($edit->closing) {
             $closing->addWords($edit->closing, 'mark');
         }
     }
     $lines = $closing->getLines();
     return $lines;
 }
 /**
  * @covers ::addWords
  * @dataProvider provideAddWords
  */
 public function testAddWords($expected, $words, $tag)
 {
     $acc = new HWLDFWordAccumulator();
     $acc->addWords($words, $tag);
     $this->assertEquals($expected, $acc->getLines());
 }