File tree Expand file tree Collapse file tree 3 files changed +34
-0
lines changed
tests/Runtime/Functions/Util Expand file tree Collapse file tree 3 files changed +34
-0
lines changed Original file line number Diff line number Diff line change 9696 " src/Fp/Functions/Evidence/ProveString.php" ,
9797 " src/Fp/Functions/Util/JsonDecode.php" ,
9898 " src/Fp/Functions/Util/RegExp.php" ,
99+ " src/Fp/Functions/Util/Writeln.php" ,
99100 " src/Fp/Functions/Panic.php" ,
100101 " src/Fp/Functions/Id.php" ,
101102 " src/Fp/Functions/Unit.php"
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ declare (strict_types=1 );
4+
5+ namespace Fp \Util ;
6+
7+ use const PHP_EOL ;
8+
9+ function writeln (string $ text ): void
10+ {
11+ print_r ($ text . PHP_EOL );
12+ }
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ declare (strict_types=1 );
4+
5+ namespace Tests \Runtime \Functions \Util ;
6+
7+ use Fp \Functional \Option \Option ;
8+ use PHPUnit \Framework \TestCase ;
9+
10+ use function Fp \Util \regExpMatch ;
11+ use function Fp \Util \writeln ;
12+ use const PHP_EOL ;
13+
14+ final class WritelnTest extends TestCase
15+ {
16+ public function testWriteln (): void
17+ {
18+ writeln ('Hi! ' );
19+ $ this ->expectOutputString ('Hi! ' . PHP_EOL );
20+ }
21+ }
You can’t perform that action at this time.
0 commit comments