File tree Expand file tree Collapse file tree 3 files changed +98
-0
lines changed Expand file tree Collapse file tree 3 files changed +98
-0
lines changed Original file line number Diff line number Diff line change
1
+ <?php declare (strict_types=1 );
2
+ /*
3
+ * This file is part of PHPUnit.
4
+ *
5
+ * (c) Sebastian Bergmann <[email protected] >
6
+ *
7
+ * For the full copyright and license information, please view the LICENSE
8
+ * file that was distributed with this source code.
9
+ */
10
+ namespace PHPUnit \TestFixture \TestDox ;
11
+
12
+ use PHPUnit \Framework \TestCase ;
13
+ use const PHP_EOL ;
14
+
15
+ final class DiffTest extends TestCase
16
+ {
17
+ public function testSomethingThatDoesNotWork (): void
18
+ {
19
+ $ this ->assertEquals (
20
+ 'foo ' . PHP_EOL . 'bar ' . PHP_EOL . 'baz ' . PHP_EOL ,
21
+ 'foo ' . PHP_EOL . 'baz ' . PHP_EOL . 'bar ' . PHP_EOL ,
22
+ );
23
+ }
24
+ }
Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ TestDox: Diff; Colorized
3
+ --FILE--
4
+ <?php declare (strict_types=1 );
5
+ $ _SERVER ['argv ' ][] = '--do-not-cache-result ' ;
6
+ $ _SERVER ['argv ' ][] = '--no-configuration ' ;
7
+ $ _SERVER ['argv ' ][] = '--testdox ' ;
8
+ $ _SERVER ['argv ' ][] = '--colors=always ' ;
9
+ $ _SERVER ['argv ' ][] = __DIR__ . '/_files/DiffTest.php ' ;
10
+
11
+ require_once __DIR__ . '/../../bootstrap.php ' ;
12
+
13
+ PHPUnit \TextUI \Command::main ();
14
+ --EXPECTF --
15
+ PHPUnit %s by Sebastian Bergmann and contributors.
16
+
17
+ [4 mDiff (PHPUnit \TestFixture \TestDox \Diff)[0 m
18
+ [31 m✘[0 m Something that does not work
19
+ [31 m┐[0 m
20
+ [31 m├[0 m [41 ;37 mFailed asserting that two strings are equal.[0 m
21
+ [31 m┊[0 m [31 m---[2 m·[22 mExpected[0 m
22
+ [31 m┊[0 m [32 m+++[2 m·[22 mActual[0 m
23
+ [31 m┊[0 m [36 m@@ @@[0 m
24
+ [31 m┊[0 m 'foo\n
25
+ [31m┊[0m [32m+baz\n[0m
26
+ [31m┊[0m bar\n
27
+ [31m┊[0m [31m-baz\n[0m
28
+ [31m┊[0m '
29
+ [31 m│[0 m
30
+ [31 m╵[0 m %stests[2 m/[22 mend-to-end[2 m/[22 mtestdox[2 m/[22 m_files[2 m/[22 mDiffTest.php[2 m:[22 m[34 m%d[0 m
31
+ [31 m┴[0 m
32
+
33
+ Time: %s, Memory: %s
34
+
35
+
36
+ [37 ;41 mFAILURES![0 m
37
+ [37 ;41 mTests: 1 [0 m[37 ;41 m, Assertions: 1 [0 m[37 ;41 m, Failures: 1 [0 m[37 ;41 m.[0 m
Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ TestDox: Diff
3
+ --FILE--
4
+ <?php declare (strict_types=1 );
5
+ $ _SERVER ['argv ' ][] = '--do-not-cache-result ' ;
6
+ $ _SERVER ['argv ' ][] = '--no-configuration ' ;
7
+ $ _SERVER ['argv ' ][] = '--testdox ' ;
8
+ $ _SERVER ['argv ' ][] = '--colors=never ' ;
9
+ $ _SERVER ['argv ' ][] = __DIR__ . '/_files/DiffTest.php ' ;
10
+
11
+ require_once __DIR__ . '/../../bootstrap.php ' ;
12
+
13
+ PHPUnit \TextUI \Command::main ();
14
+ --EXPECTF --
15
+ PHPUnit %s by Sebastian Bergmann and contributors.
16
+
17
+ Diff (PHPUnit \TestFixture \TestDox \Diff)
18
+ ✘ Something that does not work
19
+ │
20
+ │ Failed asserting that two strings are equal.
21
+ │ --- Expected
22
+ │ +++ Actual
23
+ │ @@ @@
24
+ │ 'foo\n
25
+ │ +baz\n
26
+ │ bar\n
27
+ │ -baz\n
28
+ │ '
29
+ │
30
+ │ %sDiffTest.php:%d
31
+ │
32
+
33
+ Time: %s, Memory: %s
34
+
35
+
36
+ FAILURES !
37
+ Tests: 1 , Assertions: 1 , Failures: 1.
You can’t perform that action at this time.
0 commit comments