11<?php
22
3- namespace Diff \ Renderer ;
3+ namespace Tests \ Diff ;
44
55use jblond \Diff \SequenceMatcher ;
66use PHPUnit \Framework \TestCase ;
1010 *
1111 * PHP version 7.2 or greater
1212 *
13- * @package Tests\Diff
14- * @author Mario Brandt <[email protected] > 15- * @author Ferry Cools <[email protected] > 13+ * @package Tests\Diff
14+ * @author Mario Brandt <[email protected] > 15+ * @author Ferry Cools <[email protected] > 1616 * @copyright (c) 2009 Mario Brandt
17- * @license New BSD License http://www.opensource.org/licenses/bsd-license.php
18- * @version 2.3.0
19- * @link https://github.com/JBlond/php-diff
17+ * @license New BSD License http://www.opensource.org/licenses/bsd-license.php
18+ * @version 2.3.0
19+ * @link https://github.com/JBlond/php-diff
2020 */
21-
2221class SequenceMatcherTest extends TestCase
2322{
24-
2523 /**
26- * SequenceMatcherTest constructor.
27- *
28- * @param null $name
29- * @param array $data
30- * @param string $dataName
24+ * Test the opCodes of the differences between version1 and version2 with the default options.
3125 */
32- public function __construct ($ name = null , array $ data = [], $ dataName = '' )
33- {
34- parent ::__construct ($ name , $ data , $ dataName );
35- }
36-
3726 public function testGetGroupedOpCodesDefault ()
3827 {
3928 // Test with default options.
@@ -45,8 +34,10 @@ public function testGetGroupedOpCodesDefault()
4534 $ this ->assertEquals (
4635 [
4736 [
48- ['equal ' , 4 , 7 , 4 , 7 ], ['replace ' , 7 , 8 , 7 , 8 ], ['equal ' , 8 , 11 , 8 , 11 ]
49- ]
37+ ['equal ' , 4 , 7 , 4 , 7 ],
38+ ['replace ' , 7 , 8 , 7 , 8 ],
39+ ['equal ' , 8 , 11 , 8 , 11 ],
40+ ],
5041 ],
5142 $ sequenceMatcher ->getGroupedOpCodes ()
5243 );
@@ -83,10 +74,7 @@ public function testGetGroupedOpCodesIgnoreWhitespaceTrue()
8374 ['ignoreWhitespace ' => true ]
8475 );
8576
86- $ this ->assertEquals (
87- [],
88- $ sequenceMatcher ->getGroupedOpCodes ()
89- );
77+ $ this ->assertEquals ([], $ sequenceMatcher ->getGroupedOpCodes ());
9078 }
9179
9280 public function testGetGroupedOpCodesIgnoreCaseTrue ()
@@ -98,9 +86,6 @@ public function testGetGroupedOpCodesIgnoreCaseTrue()
9886 ['ignoreCase ' => true ]
9987 );
10088
101- $ this ->assertEquals (
102- [],
103- $ sequenceMatcher ->getGroupedOpCodes ()
104- );
89+ $ this ->assertEquals ([], $ sequenceMatcher ->getGroupedOpCodes ());
10590 }
10691}
0 commit comments