Esempio n. 1
0
 /**
  *
  */
 public function testNl2br()
 {
     $this->assertEquals('Hello<br>World!', Str::nl2br("Hello\nWorld!"));
     $this->assertEquals('Hello<br>World!', Str::nl2br("Hello\rWorld!"));
     $this->assertEquals('Hello<br>World!', Str::nl2br("Hello\n\rWorld!"));
     $this->assertEquals('Hello<br>World!', Str::nl2br("Hello\r\nWorld!"));
     $this->assertEquals('Hello<br />World!', Str::nl2br("Hello\nWorld!", true));
     $this->assertEquals('Hello<br />World!', Str::nl2br("Hello\rWorld!", true));
     $this->assertEquals('Hello<br />World!', Str::nl2br("Hello\n\rWorld!", true));
     $this->assertEquals('Hello<br />World!', Str::nl2br("Hello\r\nWorld!", true));
 }