expectException($class); $this->expectExceptionCode($code); } else { // expecting a standard PHP exception $this->expectException(\Exception::class); } } function assertTime($exp, $test) { $exp = $this->dateTransform($exp, "iso8601"); $test = $this->dateTransform($test, "iso8601"); $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::$lang = new \JKingWeb\Arsse\Lang(); } return true; } }