1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
|
Description: Adapt to PHPUnit 8.x and 9.x API.
Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
Index: php-horde-text-diff/Horde_Text_Diff-2.2.1/test/Horde/Text/Diff/EngineTest.php
===================================================================
--- php-horde-text-diff.orig/Horde_Text_Diff-2.2.1/test/Horde/Text/Diff/EngineTest.php
+++ php-horde-text-diff/Horde_Text_Diff-2.2.1/test/Horde/Text/Diff/EngineTest.php
@@ -6,11 +6,11 @@
* @package Text_Diff
* @subpackage UnitTests
*/
-class Horde_Text_Diff_EngineTest extends PHPUnit_Framework_TestCase
+class Horde_Text_Diff_EngineTest extends Horde_Test_Case
{
protected $_lines = array();
- public function setUp()
+ public function setUp(): void
{
$this->_lines = array(
1 => file(__DIR__ . '/fixtures/1.txt'),
@@ -73,6 +73,8 @@ class Horde_Text_Diff_EngineTest extends
public function testXdiffEngine()
{
+ $this->expectNotToPerformAssertions();
+
try {
$diff = new Horde_Text_Diff('Xdiff', array($this->_lines[1], $this->_lines[2]));
$this->_testDiff($diff);
Index: php-horde-text-diff/Horde_Text_Diff-2.2.1/test/Horde/Text/Diff/RendererTest.php
===================================================================
--- php-horde-text-diff.orig/Horde_Text_Diff-2.2.1/test/Horde/Text/Diff/RendererTest.php
+++ php-horde-text-diff/Horde_Text_Diff-2.2.1/test/Horde/Text/Diff/RendererTest.php
@@ -10,7 +10,7 @@ class Horde_Text_Diff_RendererTest exten
{
protected $_lines = array();
- public function setUp()
+ public function setUp(): void
{
for ($i = 1; $i <= 8; $i++) {
$this->_lines[$i] = file(__DIR__ . '/fixtures/' . $i . '.txt');
@@ -266,6 +266,8 @@ END_OF_PATCH;
public function testPearBug12710()
{
+ $this->expectNotToPerformAssertions();
+
/* failed assertion */
$a = <<<QQ
<li>The tax credit amounts to 30% of the cost of the system, with a
Index: php-horde-text-diff/Horde_Text_Diff-2.2.1/test/Horde/Text/Diff/ThreeWayTest.php
===================================================================
--- php-horde-text-diff.orig/Horde_Text_Diff-2.2.1/test/Horde/Text/Diff/ThreeWayTest.php
+++ php-horde-text-diff/Horde_Text_Diff-2.2.1/test/Horde/Text/Diff/ThreeWayTest.php
@@ -10,7 +10,7 @@ class Horde_Text_Diff_ThreeWayTest exten
{
protected $_lines = array();
- public function setUp()
+ public function setUp(): void
{
for ($i = 1; $i <= 4; $i++) {
$this->_lines[$i] = file(__DIR__ . '/fixtures/' . $i . '.txt');
Index: php-horde-text-diff/Horde_Text_Diff-2.2.1/test/Horde/Text/Diff/phpunit.xml
===================================================================
--- /dev/null
+++ php-horde-text-diff/Horde_Text_Diff-2.2.1/test/Horde/Text/Diff/phpunit.xml
@@ -0,0 +1 @@
+<phpunit bootstrap="bootstrap.php"></phpunit>
|