File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -64,6 +64,16 @@ public function append(...$values)
64
64
return new static ($ this ->value .implode ('' , $ values ));
65
65
}
66
66
67
+ /**
68
+ * Append a new line to the string.
69
+ *
70
+ * @return $this
71
+ */
72
+ public function newLine ()
73
+ {
74
+ return $ this ->append (PHP_EOL );
75
+ }
76
+
67
77
/**
68
78
* Transliterate a UTF-8 value to ASCII.
69
79
*
Original file line number Diff line number Diff line change @@ -419,6 +419,11 @@ public function testAscii()
419
419
$ this ->assertSame ('u ' , (string ) $ this ->stringable ('ü ' )->ascii ());
420
420
}
421
421
422
+ public function testNewLine ()
423
+ {
424
+ $ this ->assertSame ('Laravel ' .PHP_EOL , (string ) $ this ->stringable ('Laravel ' )->newLine ());
425
+ }
426
+
422
427
public function testAsciiWithSpecificLocale ()
423
428
{
424
429
$ this ->assertSame ('h H sht Sht a A ia yo ' , (string ) $ this ->stringable ('х Х щ Щ ъ Ъ иа йо ' )->ascii ('bg ' ));
You can’t perform that action at this time.
0 commit comments