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 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140
|
Description: Adapt to PHPUnit 8.x and 9.x API.
Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
Index: php-horde-pack/Horde_Pack-1.0.7/test/Horde/Pack/AutodetermineTest.php
===================================================================
--- php-horde-pack.orig/Horde_Pack-1.0.7/test/Horde/Pack/AutodetermineTest.php
+++ php-horde-pack/Horde_Pack-1.0.7/test/Horde/Pack/AutodetermineTest.php
@@ -27,7 +27,7 @@ class Horde_Pack_AutodetermineTest exten
{
private $types;
- public function setUp()
+ public function setUp(): void
{
$this->types = array(
true,
Index: php-horde-pack/Horde_Pack-1.0.7/test/Horde/Pack/Driver/TestBase.php
===================================================================
--- php-horde-pack.orig/Horde_Pack-1.0.7/test/Horde/Pack/Driver/TestBase.php
+++ php-horde-pack/Horde_Pack-1.0.7/test/Horde/Pack/Driver/TestBase.php
@@ -30,13 +30,13 @@ abstract class Horde_Pack_Driver_TestBas
protected $drivername;
- public static function setUpBeforeClass()
+ public static function setUpBeforeClass(): void
{
self::$pack = new Horde_Pack();
self::$sampleob = new Horde_Pack_Autodetermine(true);
}
- protected function setUp()
+ protected function setUp(): void
{
if (!call_user_func(array($this->drivername, 'supported'))) {
$this->markTestSkipped(
@@ -147,11 +147,9 @@ abstract class Horde_Pack_Driver_TestBas
}
}
- /**
- * @expectedException Horde_Pack_Exception
- */
public function testExpectedExceptionOnBadUnpack()
{
+ $this->expectException('Horde_Pack_Exception');
$packed = $this->_pack(true, false);
self::$pack->unpack($packed[0] . "A{{}");
}
Index: php-horde-pack/Horde_Pack-1.0.7/test/Horde/Pack/Driver/JsonTest.php
===================================================================
--- php-horde-pack.orig/Horde_Pack-1.0.7/test/Horde/Pack/Driver/JsonTest.php
+++ php-horde-pack/Horde_Pack-1.0.7/test/Horde/Pack/Driver/JsonTest.php
@@ -27,12 +27,23 @@ class Horde_Pack_Driver_JsonTest extends
{
protected $drivername = 'Horde_Pack_Driver_Json';
- /**
- * @expectedException Horde_Pack_Exception
- * @expectedExceptionMessage Could not pack data.
- */
public function testInvalidUtf8()
{
+ $this->expectException('Horde_Pack_Exception');
+ $this->expectExceptionMessage('Could not pack data.');
+
$this->_runTest(chr(228));
}
+
+ public function testPhpObject()
+ {
+ $this->expectNotToPerformAssertions();
+ parent::testPhpObject();
+ }
+
+ public function testPhpObjectWithCompression()
+ {
+ $this->expectNotToPerformAssertions();
+ parent::testPhpObjectWithCompression();
+ }
}
Index: php-horde-pack/Horde_Pack-1.0.7/test/Horde/Pack/Driver/MsgpackTest.php
===================================================================
--- php-horde-pack.orig/Horde_Pack-1.0.7/test/Horde/Pack/Driver/MsgpackTest.php
+++ php-horde-pack/Horde_Pack-1.0.7/test/Horde/Pack/Driver/MsgpackTest.php
@@ -26,4 +26,16 @@
class Horde_Pack_Driver_MsgpackTest extends Horde_Pack_Driver_TestBase
{
protected $drivername = 'Horde_Pack_Driver_Msgpack';
+
+ public function testPhpObject()
+ {
+ $this->expectNotToPerformAssertions();
+ parent::testPhpObject();
+ }
+
+ public function testPhpObjectWithCompression()
+ {
+ $this->expectNotToPerformAssertions();
+ parent::testPhpObjectWithCompression();
+ }
}
Index: php-horde-pack/Horde_Pack-1.0.7/test/Horde/Pack/Driver/MsgpackserializeTest.php
===================================================================
--- php-horde-pack.orig/Horde_Pack-1.0.7/test/Horde/Pack/Driver/MsgpackserializeTest.php
+++ php-horde-pack/Horde_Pack-1.0.7/test/Horde/Pack/Driver/MsgpackserializeTest.php
@@ -27,4 +27,16 @@ class Horde_Pack_Driver_Msgpackserialize
extends Horde_Pack_Driver_TestBase
{
protected $drivername = 'Horde_Pack_Driver_Msgpackserialize';
+
+ public function testPhpObject()
+ {
+ $this->expectNotToPerformAssertions();
+ parent::testPhpObject();
+ }
+
+ public function testPhpObjectWithCompression()
+ {
+ $this->expectNotToPerformAssertions();
+ parent::testPhpObjectWithCompression();
+ }
}
Index: php-horde-pack/Horde_Pack-1.0.7/test/Horde/Pack/PackTest.php
===================================================================
--- php-horde-pack.orig/Horde_Pack-1.0.7/test/Horde/Pack/PackTest.php
+++ php-horde-pack/Horde_Pack-1.0.7/test/Horde/Pack/PackTest.php
@@ -25,11 +25,9 @@
*/
class Horde_Pack_PackTest extends Horde_Test_Case
{
- /**
- * @expectedException LogicException
- */
public function testExpectedExceptionOnSerialize()
{
+ $this->expectException('LogicException');
$pack = new Horde_Pack();
serialize($pack);
}
|