expectException($class); $this->expectExceptionCode($code); } else { // expecting a standard PHP exception $this->expectException(\Exception::class); } } function assertTime($exp, $test) { $exp = $this->dateTransform($exp, "unix"); $test = $this->dateTransform($test, "unix"); $this->assertSame($exp, $test); } function clearData(bool $loadLang = true): bool { $r = new \ReflectionClass(\JKingWeb\Arsse\Data::class); $props = array_keys($r->getStaticProperties()); foreach($props as $prop) { Data::$$prop = null; } if($loadLang) { Data::$l = new \JKingWeb\Arsse\Lang(); } return true; } }