Added some PHPUnit Tests
This commit is contained in:
@ -33,7 +33,7 @@ class CallbackHelpStructure extends DocumentationStructure {
|
||||
* @api
|
||||
* @return mixed
|
||||
*/
|
||||
public function getMethodName() {
|
||||
public function getCallbackName() {
|
||||
return $this->callbackName;
|
||||
}
|
||||
|
||||
|
@ -589,7 +589,7 @@ class ManiaControl implements CallbackListener, CommandListener, TimerListener,
|
||||
$this->getChat()->sendInformation('ManiaControl v' . self::VERSION . ' successfully started!');
|
||||
|
||||
$this->startTime = time();
|
||||
|
||||
|
||||
// Main loop
|
||||
while (!$this->requestQuitMessage) {
|
||||
$this->loop();
|
||||
@ -613,8 +613,9 @@ class ManiaControl implements CallbackListener, CommandListener, TimerListener,
|
||||
|
||||
/**
|
||||
* Connect to ManiaPlanet server
|
||||
* Public only for PHPUnit Tests
|
||||
*/
|
||||
private function connect() {
|
||||
public function connect() {
|
||||
// Load remote client
|
||||
$serverConfig = $this->getServer()->loadConfig();
|
||||
|
||||
|
@ -3,6 +3,7 @@
|
||||
namespace ManiaControl\Script;
|
||||
|
||||
use ManiaControl\Callbacks\Callbacks;
|
||||
use ManiaControl\Callbacks\Structures\XmlRpc\CallbackListStructure;
|
||||
use ManiaControl\General\UsageInformationAble;
|
||||
use ManiaControl\General\UsageInformationTrait;
|
||||
use ManiaControl\ManiaControl;
|
||||
@ -38,6 +39,7 @@ class ModeScriptEventManager implements UsageInformationAble {
|
||||
$this->maniaControl->getClient()->triggerModeScriptEvent('XmlRpc.EnableCallbacks', array('true'));
|
||||
|
||||
$this->setApiVersion(self::API_VERSION);
|
||||
$this->unBlockAllCallbacks();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -80,7 +82,18 @@ class ModeScriptEventManager implements UsageInformationAble {
|
||||
}
|
||||
|
||||
/**
|
||||
* Provide a Array of Callbacks you want to Block
|
||||
* UnBlocks All Callbacks
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public function unBlockAllCallbacks() {
|
||||
$this->getListOfDisabledCallbacks()->setCallable(function (CallbackListStructure $structure) {
|
||||
$this->unBlockCallbacks($structure->getCallbacks());
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Provide a Array of Callbacks you want to UnBlock
|
||||
*
|
||||
* @api
|
||||
* @param array $callbackNames
|
||||
@ -325,7 +338,7 @@ class ModeScriptEventManager implements UsageInformationAble {
|
||||
* @param $y
|
||||
* @param $z
|
||||
*/
|
||||
public function suegeSetProgressionUIPosition($x, $y, $z) {
|
||||
public function siegeSetProgressionUIPosition($x, $y, $z) {
|
||||
$this->maniaControl->getClient()->triggerModeScriptEvent('Shootmania.Siege.SetProgressionUIPosition', array(strval(floatval($x)), strval(floatval($y)), strval(floatval($z))));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user