2017-04-21 21:09:21 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
use ManiaControl\ManiaControl;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* PHP Unit Test for Custom UI Manager
|
|
|
|
*
|
|
|
|
* @author ManiaControl Team <mail@maniacontrol.com>
|
2018-03-27 20:11:40 +02:00
|
|
|
* @copyright 2014-2018 ManiaControl Team
|
2017-04-21 21:09:21 +02:00
|
|
|
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
|
|
|
|
*/
|
|
|
|
class CustomUIManagerTest extends PHPUnit_Framework_TestCase {
|
2017-04-22 08:27:40 +02:00
|
|
|
public function testUiProperties() { //FIXME this test does not work at all at the moment
|
|
|
|
/*$maniaControl = new ManiaControl();
|
2017-04-21 21:09:21 +02:00
|
|
|
$maniaControl->connect();
|
|
|
|
|
|
|
|
$customUiManager = $maniaControl->getManialinkManager()->getCustomUIManager();
|
2017-04-22 08:27:40 +02:00
|
|
|
$maniaControl->run(4);
|
|
|
|
|
|
|
|
var_dump("test1");
|
|
|
|
var_dump($customUiManager->getShootManiaUIProperties()->getUiPropertiesObject()->notices);
|
2017-04-21 21:09:21 +02:00
|
|
|
|
|
|
|
//Connect Again and Disable Notices
|
|
|
|
$maniaControl->connect();
|
|
|
|
$customUiManager->disableNotices();
|
|
|
|
|
2017-04-22 08:27:40 +02:00
|
|
|
$maniaControl->run(4);
|
|
|
|
|
|
|
|
var_dump("test2");
|
|
|
|
var_dump($customUiManager->getShootManiaUIProperties()->getUiPropertiesObject()->notices);
|
2017-04-21 21:09:21 +02:00
|
|
|
|
|
|
|
$this->assertFalse($customUiManager->getShootManiaUIProperties()->getUiPropertiesObject()->notices->visible);
|
|
|
|
|
|
|
|
//Connect Again and Disable Notices
|
|
|
|
$maniaControl->connect();
|
|
|
|
$customUiManager->enableNotices();
|
|
|
|
|
2017-04-22 08:27:40 +02:00
|
|
|
$maniaControl->run(4);
|
2017-04-21 21:09:21 +02:00
|
|
|
|
2017-04-22 08:27:40 +02:00
|
|
|
var_dump("test3");
|
2017-04-21 21:09:21 +02:00
|
|
|
var_dump($customUiManager->getShootManiaUIProperties()->getUiPropertiesObject()->notices);
|
2017-04-22 08:27:40 +02:00
|
|
|
$this->assertTrue($customUiManager->getShootManiaUIProperties()->getUiPropertiesObject()->notices->visible);*/
|
2017-04-21 21:09:21 +02:00
|
|
|
|
|
|
|
}
|
|
|
|
}
|