Skip to content

Commit

Permalink
Fix namespace and unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
DigiLive committed Nov 19, 2020
1 parent 79d989d commit 77a7b59
Showing 1 changed file with 14 additions and 29 deletions.
43 changes: 14 additions & 29 deletions tests/Diff/SequenceMatcherTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Diff\Renderer;
namespace Tests\Diff;

use jblond\Diff\SequenceMatcher;
use PHPUnit\Framework\TestCase;
Expand All @@ -10,30 +10,19 @@
*
* PHP version 7.2 or greater
*
* @package Tests\Diff
* @author Mario Brandt <[email protected]>
* @author Ferry Cools <[email protected]>
* @package Tests\Diff
* @author Mario Brandt <[email protected]>
* @author Ferry Cools <[email protected]>
* @copyright (c) 2009 Mario Brandt
* @license New BSD License http://www.opensource.org/licenses/bsd-license.php
* @version 2.3.0
* @link https://github.com/JBlond/php-diff
* @license New BSD License http://www.opensource.org/licenses/bsd-license.php
* @version 2.3.0
* @link https://github.com/JBlond/php-diff
*/

class SequenceMatcherTest extends TestCase
{

/**
* SequenceMatcherTest constructor.
*
* @param null $name
* @param array $data
* @param string $dataName
* Test the opCodes of the differences between version1 and version2 with the default options.
*/
public function __construct($name = null, array $data = [], $dataName = '')
{
parent::__construct($name, $data, $dataName);
}

public function testGetGroupedOpCodesDefault()
{
// Test with default options.
Expand All @@ -45,8 +34,10 @@ public function testGetGroupedOpCodesDefault()
$this->assertEquals(
[
[
['equal', 4, 7, 4, 7], ['replace', 7, 8, 7, 8], ['equal', 8, 11, 8, 11]
]
['equal', 4, 7, 4, 7],
['replace', 7, 8, 7, 8],
['equal', 8, 11, 8, 11],
],
],
$sequenceMatcher->getGroupedOpCodes()
);
Expand Down Expand Up @@ -83,10 +74,7 @@ public function testGetGroupedOpCodesIgnoreWhitespaceTrue()
['ignoreWhitespace' => true]
);

$this->assertEquals(
[],
$sequenceMatcher->getGroupedOpCodes()
);
$this->assertEquals([], $sequenceMatcher->getGroupedOpCodes());
}

public function testGetGroupedOpCodesIgnoreCaseTrue()
Expand All @@ -98,9 +86,6 @@ public function testGetGroupedOpCodesIgnoreCaseTrue()
['ignoreCase' => true]
);

$this->assertEquals(
[],
$sequenceMatcher->getGroupedOpCodes()
);
$this->assertEquals([], $sequenceMatcher->getGroupedOpCodes());
}
}

0 comments on commit 77a7b59

Please sign in to comment.