From ff4970578a5e5a4c3d6a810b1ef1ccf25825b99a Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Date: Wed, 28 Aug 2013 15:27:24 +0200 Subject: [PATCH] Moved requires() --- src/tests/ServerSuiteTest.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/tests/ServerSuiteTest.php b/src/tests/ServerSuiteTest.php index 9389ac920..7b9a4f756 100644 --- a/src/tests/ServerSuiteTest.php +++ b/src/tests/ServerSuiteTest.php @@ -9,6 +9,9 @@ class ServerSuiteTest extends PHPUnit_Framework_TestCase{ } public function testRead(){ + require_once(dirname(__FILE__)."/../dependencies.php"); + require_once(FILE_PATH."/src/functions.php"); + require_once(FILE_PATH."/src/dependencies.php"); //binary things $this->assertTrue(Utils::readTriad("\x02\x01\x03") === 131331, "Utils::readTriad"); @@ -16,10 +19,8 @@ class ServerSuiteTest extends PHPUnit_Framework_TestCase{ $this->assertTrue(abs(Utils::readFloat("\x49\x02\x01\x03") - 532496.1875) < 0.0001, "Utils::readFloat"); $this->assertTrue(abs(Utils::readDouble("\x41\x02\x03\x04\x05\x06\x07\x08") - 147552.5024529) < 0.0001, "Utils::readDouble"); $this->assertTrue(Utils::readLong("\x41\x02\x03\x04\x05\x06\x07\x08") === "4684309878217770760", "Utils::readLong"); + //PocketMine-MP server startup - require_once(dirname(__FILE__)."/../dependencies.php"); - require_once(FILE_PATH."/src/functions.php"); - require_once(FILE_PATH."/src/dependencies.php"); $this->server = new ServerAPI(); $this->assertTrue(is_integer($this->server->event("server.start", array($this, "hook")))); $this->server->start();