From e2e960e43de6ccffc609c18a663a95784ae8f7e4 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Mon, 26 Oct 2020 15:59:42 +0000 Subject: [PATCH] tests: add missing function imports --- .../level/format/io/region/RegionLocationTableEntryTest.php | 1 + tests/phpunit/utils/ConfigTest.php | 1 + tests/plugins/TesterPlugin/src/pmmp/TesterPlugin/Main.php | 1 + tests/plugins/TesterPlugin/src/pmmp/TesterPlugin/Test.php | 2 ++ .../src/pmmp/TesterPlugin/tests/AsyncTaskMainLoggerTest.php | 3 +++ .../src/pmmp/TesterPlugin/tests/AsyncTaskMemoryLeakTest.php | 1 + 6 files changed, 9 insertions(+) diff --git a/tests/phpunit/level/format/io/region/RegionLocationTableEntryTest.php b/tests/phpunit/level/format/io/region/RegionLocationTableEntryTest.php index bf8550df4..c87a537a1 100644 --- a/tests/phpunit/level/format/io/region/RegionLocationTableEntryTest.php +++ b/tests/phpunit/level/format/io/region/RegionLocationTableEntryTest.php @@ -24,6 +24,7 @@ declare(strict_types=1); namespace pocketmine\level\format\io\region; use PHPUnit\Framework\TestCase; +use function sprintf; class RegionLocationTableEntryTest extends TestCase{ diff --git a/tests/phpunit/utils/ConfigTest.php b/tests/phpunit/utils/ConfigTest.php index 97d88a788..22f9f3ea8 100644 --- a/tests/phpunit/utils/ConfigTest.php +++ b/tests/phpunit/utils/ConfigTest.php @@ -24,6 +24,7 @@ declare(strict_types=1); namespace pocketmine\utils; use PHPUnit\Framework\TestCase; +use function yaml_parse; class ConfigTest extends TestCase{ diff --git a/tests/plugins/TesterPlugin/src/pmmp/TesterPlugin/Main.php b/tests/plugins/TesterPlugin/src/pmmp/TesterPlugin/Main.php index 41ca5512e..cbe1408e3 100644 --- a/tests/plugins/TesterPlugin/src/pmmp/TesterPlugin/Main.php +++ b/tests/plugins/TesterPlugin/src/pmmp/TesterPlugin/Main.php @@ -26,6 +26,7 @@ namespace pmmp\TesterPlugin; use pocketmine\event\Listener; use pocketmine\event\server\CommandEvent; use pocketmine\plugin\PluginBase; +use function array_shift; class Main extends PluginBase implements Listener{ diff --git a/tests/plugins/TesterPlugin/src/pmmp/TesterPlugin/Test.php b/tests/plugins/TesterPlugin/src/pmmp/TesterPlugin/Test.php index f20402336..7af551840 100644 --- a/tests/plugins/TesterPlugin/src/pmmp/TesterPlugin/Test.php +++ b/tests/plugins/TesterPlugin/src/pmmp/TesterPlugin/Test.php @@ -23,6 +23,8 @@ declare(strict_types=1); namespace pmmp\TesterPlugin; +use function time; + abstract class Test{ const RESULT_WAITING = -1; const RESULT_OK = 0; diff --git a/tests/plugins/TesterPlugin/src/pmmp/TesterPlugin/tests/AsyncTaskMainLoggerTest.php b/tests/plugins/TesterPlugin/src/pmmp/TesterPlugin/tests/AsyncTaskMainLoggerTest.php index 3f52c6fd5..fd10642ff 100644 --- a/tests/plugins/TesterPlugin/src/pmmp/TesterPlugin/tests/AsyncTaskMainLoggerTest.php +++ b/tests/plugins/TesterPlugin/src/pmmp/TesterPlugin/tests/AsyncTaskMainLoggerTest.php @@ -28,7 +28,10 @@ use pocketmine\scheduler\AsyncTask; use pocketmine\Server; use pocketmine\utils\AssumptionFailedError; use pocketmine\utils\MainLogger; +use function ob_end_flush; use function ob_get_contents; +use function ob_start; +use function strpos; class AsyncTaskMainLoggerTest extends Test{ diff --git a/tests/plugins/TesterPlugin/src/pmmp/TesterPlugin/tests/AsyncTaskMemoryLeakTest.php b/tests/plugins/TesterPlugin/src/pmmp/TesterPlugin/tests/AsyncTaskMemoryLeakTest.php index 7970fc026..b59c08c0f 100644 --- a/tests/plugins/TesterPlugin/src/pmmp/TesterPlugin/tests/AsyncTaskMemoryLeakTest.php +++ b/tests/plugins/TesterPlugin/src/pmmp/TesterPlugin/tests/AsyncTaskMemoryLeakTest.php @@ -25,6 +25,7 @@ namespace pmmp\TesterPlugin\tests; use pmmp\TesterPlugin\Test; use pocketmine\scheduler\AsyncTask; +use function usleep; class AsyncTaskMemoryLeakTest extends Test{