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 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234
|
Description: Adapt to PHPUnit 8.x and 9.x API.
Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
@@ -53,14 +53,14 @@
*/
private $_added = array();
- public static function setUpBeforeClass()
+ public static function setUpBeforeClass(): void
{
self::$setup = new Horde_Test_Setup();
self::createBasicKronolithSetup(self::$setup);
parent::setUpBeforeClass();
}
- public static function tearDownAfterClass()
+ public static function tearDownAfterClass(): void
{
self::$driver = null;
parent::tearDownAfterClass();
@@ -70,7 +70,7 @@
unset($GLOBALS['session']);
}
- public function setUp()
+ public function setUp(): void
{
$error = self::$setup->getError();
if (!empty($error)) {
@@ -78,7 +78,7 @@
}
}
- public function tearDown()
+ public function tearDown(): void
{
parent::tearDown();
foreach ($this->_added as $added) {
@@ -31,7 +31,7 @@
{
protected $backupGlobals = false;
- public static function setUpBeforeClass()
+ public static function setUpBeforeClass(): void
{
return;
parent::setUpBeforeClass();
@@ -41,7 +41,7 @@
self::$type = 'Kolab';
}
- public function setUp()
+ public function setUp(): void
{
$this->markTestIncomplete('Unserialization error from Kolab share objects.');
}
@@ -31,7 +31,7 @@
{
static $callback;
- static public function setUpBeforeClass()
+ static public function setUpBeforeClass(): void
{
parent::setUpBeforeClass();
self::getDb();
@@ -31,7 +31,7 @@
{
protected $backupGlobals = false;
- static public function setUpBeforeClass()
+ static public function setUpBeforeClass(): void
{
self::$callback = array(__CLASS__, 'getDb');
parent::setUpBeforeClass();
@@ -29,13 +29,13 @@
*/
class Kronolith_Integration_FromIcalendarTest extends Kronolith_TestCase
{
- public function setUp()
+ public function setUp(): void
{
$this->_timezone = date_default_timezone_get();
date_default_timezone_set('Europe/Berlin');
}
- public function tearDown()
+ public function tearDown(): void
{
date_default_timezone_set($this->_timezone);
}
@@ -107,6 +107,8 @@
public function testInvalidTimezone()
{
+ $this->expectNotToPerformAssertions();
+
$GLOBALS['conf']['calendar']['driver'] = 'Mock';
$GLOBALS['injector'] = new Horde_Injector(new Horde_Injector_TopLevel());
$event = $this->_getFixture('bug11688.ics', 1);
@@ -43,14 +43,14 @@
*/
protected $default_name = 'Calendar of test@example.com';
- public static function setUpBeforeClass()
+ public static function setUpBeforeClass(): void
{
self::$setup = new Horde_Test_Setup();
self::createBasicKronolithSetup(self::$setup);
parent::setUpBeforeClass();
}
- public static function tearDownAfterClass()
+ public static function tearDownAfterClass(): void
{
parent::tearDownAfterClass();
unset($GLOBALS['registry']);
@@ -59,7 +59,7 @@
unset($GLOBALS['session']);
}
- public function setUp()
+ public function setUp(): void
{
$GLOBALS['conf']['autoshare']['shareperms'] = 'none';
$error = self::$setup->getError();
@@ -68,7 +68,7 @@
}
}
- public function tearDown()
+ public function tearDown(): void
{
foreach ($GLOBALS['injector']->getInstance('Kronolith_Shares')->listShares('test@example.com') as $share) {
$GLOBALS['injector']->getInstance('Kronolith_Shares')->removeShare($share);
@@ -38,7 +38,7 @@
*/
protected $default_name = 'Calendar';
- public static function setUpBeforeClass()
+ public static function setUpBeforeClass(): void
{
return;
self::$setup = new Horde_Test_Setup();
@@ -46,7 +46,7 @@
self::createKolabShares(self::$setup);
}
- public function setUp()
+ public function setUp(): void
{
$this->markTestIncomplete("No query of type 'Share' registered!");
}
@@ -31,7 +31,7 @@
{
static $callback;
- static public function setUpBeforeClass()
+ static public function setUpBeforeClass(): void
{
parent::setUpBeforeClass();
self::getDb();
@@ -31,7 +31,7 @@
{
protected $backupGlobals = false;
- static public function setUpBeforeClass()
+ static public function setUpBeforeClass(): void
{
self::$callback = array(__CLASS__, 'getDb');
parent::setUpBeforeClass();
@@ -29,7 +29,7 @@
*/
class Kronolith_Integration_ToIcalendarTest extends Kronolith_TestCase
{
- public function setUp()
+ public function setUp(): void
{
$this->_timezone = date_default_timezone_get();
date_default_timezone_set('Europe/Berlin');
@@ -43,7 +43,7 @@
$GLOBALS['conf']['calendar']['driver'] = 'Mock';
}
- public function tearDown()
+ public function tearDown(): void
{
unset($GLOBALS['registry']);
unset($GLOBALS['injector']);
@@ -28,7 +28,7 @@
* @license http://www.horde.org/licenses/gpl GNU General Public License, version 2
*/
class Kronolith_TestCase
-extends PHPUnit_Framework_TestCase
+extends Horde_Test_Case
{
protected function getInjector()
{
@@ -0,0 +1 @@
+<phpunit bootstrap="bootstrap.php"></phpunit>
@@ -29,7 +29,7 @@
*/
class Kronolith_Integration_AllDayTest extends Kronolith_TestCase
{
- static public function setupBeforeClass()
+ static public function setupBeforeClass(): void
{
$GLOBALS['calendar_manager'] = new Kronolith_Stub_CalendarManager();
}
|