feat: adds support for global helpers

This commit is contained in:
Nuno Maduro
2020-05-13 22:51:50 +02:00
parent 2d85842777
commit 6fc55becc8
6 changed files with 151 additions and 3 deletions

View File

@ -92,6 +92,8 @@ trait TestCase
*/
protected function setUp(): void
{
TestSuite::getInstance()->test = $this;
parent::setUp();
$beforeEach = TestSuite::getInstance()->beforeEach->get(self::$__filename);
@ -109,6 +111,8 @@ trait TestCase
$this->__callClosure($afterEach, func_get_args());
parent::tearDown();
TestSuite::getInstance()->test = null;
}
/**