diff --git a/tests/phpunit/event/AsyncEventConcurrencyTest.php b/tests/phpunit/event/AsyncEventConcurrencyTest.php index fed1edf5e7..7533ddeb75 100644 --- a/tests/phpunit/event/AsyncEventConcurrencyTest.php +++ b/tests/phpunit/event/AsyncEventConcurrencyTest.php @@ -35,8 +35,6 @@ use function count; final class AsyncEventConcurrencyTest extends TestCase{ private Plugin $mockPlugin; - private Server $mockServer; - private PluginManager $pluginManager; //this one gets its own class because it requires a bunch of context variables @@ -57,10 +55,10 @@ final class AsyncEventConcurrencyTest extends TestCase{ //TODO: this is a really bad hack and could break any time if PluginManager decides to access its Server field //we really need to make it possible to register events without a Plugin or Server context - $this->mockServer = $this->createMock(Server::class); + $mockServer = $this->createMock(Server::class); $this->mockPlugin = self::createStub(Plugin::class); $this->mockPlugin->method('isEnabled')->willReturn(true); - $this->pluginManager = new PluginManager($this->mockServer, null); + $this->pluginManager = new PluginManager($mockServer, null); } public static function tearDownAfterClass() : void{ diff --git a/tests/phpunit/event/AsyncEventTest.php b/tests/phpunit/event/AsyncEventTest.php index f8d49e855a..ecc03c1930 100644 --- a/tests/phpunit/event/AsyncEventTest.php +++ b/tests/phpunit/event/AsyncEventTest.php @@ -35,8 +35,6 @@ use pocketmine\Server; use function shuffle; final class AsyncEventTest extends TestCase{ - - private Server $mockServer; private Plugin $mockPlugin; private PluginManager $pluginManager; @@ -45,10 +43,10 @@ final class AsyncEventTest extends TestCase{ //TODO: this is a really bad hack and could break any time if PluginManager decides to access its Server field //we really need to make it possible to register events without a Plugin or Server context - $this->mockServer = $this->createMock(Server::class); + $mockServer = $this->createMock(Server::class); $this->mockPlugin = self::createStub(Plugin::class); $this->mockPlugin->method('isEnabled')->willReturn(true); - $this->pluginManager = new PluginManager($this->mockServer, null); + $this->pluginManager = new PluginManager($mockServer, null); } public static function tearDownAfterClass() : void{