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
|
Description: Adapt to PHPUnit 8.x and 9.x API.
Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
Index: php-horde-passwd/passwd-5.0.7/test/Passwd/TestCase.php
===================================================================
--- php-horde-passwd.orig/passwd-5.0.7/test/Passwd/TestCase.php
+++ php-horde-passwd/passwd-5.0.7/test/Passwd/TestCase.php
@@ -8,7 +8,7 @@
* @package Passwd
* @subpackage UnitTests
*/
-class Passwd_TestCase extends PHPUnit_Framework_TestCase
+class Passwd_TestCase extends Horde_Test_Case
{
protected function getInjector()
{
Index: php-horde-passwd/passwd-5.0.7/test/Passwd/Unit/Driver/SqlTest.php
===================================================================
--- php-horde-passwd.orig/passwd-5.0.7/test/Passwd/Unit/Driver/SqlTest.php
+++ php-horde-passwd/passwd-5.0.7/test/Passwd/Unit/Driver/SqlTest.php
@@ -13,13 +13,13 @@ class Passwd_Unit_Driver_SqlTest extends
{
private $driver;
- public static function setUpBeforeClass()
+ public static function setUpBeforeClass(): void
{
self::createBasicPasswdSetup(new Horde_Test_Setup());
parent::setUpBeforeClass();
}
- public function setUp()
+ public function setUp(): void
{
$GLOBALS['injector'] = $this->getInjector();
$factory = new Passwd_Factory_Driver($this->getInjector());
@@ -42,11 +42,10 @@ class Passwd_Unit_Driver_SqlTest extends
$this->assertInstanceOf('Passwd_Driver', $this->driver);
}
- /**
- * @expectedException Passwd_Exception
- */
public function testChangePasswordFailsForNonexistingUser()
{
+ $this->expectException('Passwd_Exception');
+
$res = $this->driver->changePassword('Patricia', 'alt', 'neu');
}
Index: php-horde-passwd/passwd-5.0.7/test/Passwd/Unit/Factory/DriverTest.php
===================================================================
--- php-horde-passwd.orig/passwd-5.0.7/test/Passwd/Unit/Factory/DriverTest.php
+++ php-horde-passwd/passwd-5.0.7/test/Passwd/Unit/Factory/DriverTest.php
@@ -14,7 +14,7 @@ class Passwd_Unit_Factory_DriverTest ext
{
protected $_backends = array();
- public function setUp()
+ public function setUp(): void
{
$this->markTestIncomplete('Factories with configuration files don\'t work out of the box.');
$this->_backends = array(
|