Example #1
0
 /**
  * __construct() should return word element if parameter is not null
  */
 public function testConstruct_returnsElement_ifParameterIsNotNull()
 {
     $parameter = 1;
     $word = new Word($parameter);
     $this->assertTrue($word instanceof Word);
     $this->assertEquals('word', $word->getWord());
     $this->assertEquals($parameter, $word->getParameter());
     return;
 }
Example #2
0
 /**
  * @dataProvider dataProviderTestParse
  */
 public function testParse($string, $getWord, array $getStyles, $hasWord, $hasStyles, $isStyle)
 {
     $word = new Word($string);
     $this->assertSame($string, $word->getRawString());
     $this->assertSame($getWord, $word->getWord());
     $this->assertSame($getStyles, $word->getStyles());
     $this->assertSame($hasWord, $word->hasWord());
     $this->assertSame($hasStyles, $word->hasStyles());
     $this->assertSame($isStyle, $word->isStyle());
 }