Exemple #1
0
 /**
  * @dataProvider dataProviderTestParse
  */
 public function testParse($string, $count, array $getStyles, $hasStyles)
 {
     $paragraph = new Paragraph($string);
     $this->assertSame($string, $paragraph->getRawString());
     $this->assertSame($count, count($paragraph));
     $this->assertSame($count, $paragraph->getCount());
     $this->assertSame($count > 0 ? false : true, $paragraph->isEmpty());
     foreach ($paragraph as $line) {
         $this->assertInstanceOf('\\Inml\\Text\\Line', $line);
     }
     $this->assertSame($getStyles, $paragraph->getStyles());
     $this->assertSame($hasStyles, $paragraph->hasStyles());
 }