not working ui property manager update start

This commit is contained in:
kremsy
2017-04-21 21:09:21 +02:00
parent 25089d97e8
commit a77b901f78
4 changed files with 104 additions and 3 deletions

View File

@ -0,0 +1,38 @@
<?php
use ManiaControl\ManiaControl;
/**
* PHP Unit Test for Custom UI Manager
*
* @author ManiaControl Team <mail@maniacontrol.com>
* @copyright 2014-2017 ManiaControl Team
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
*/
class CustomUIManagerTest extends PHPUnit_Framework_TestCase {
public function testUiProperties() { //Not Working Yet
$maniaControl = new ManiaControl();
$maniaControl->connect();
$customUiManager = $maniaControl->getManialinkManager()->getCustomUIManager();
$maniaControl->run(3);
//Connect Again and Disable Notices
$maniaControl->connect();
$customUiManager->disableNotices();
$maniaControl->run(3);
$this->assertFalse($customUiManager->getShootManiaUIProperties()->getUiPropertiesObject()->notices->visible);
//Connect Again and Disable Notices
$maniaControl->connect();
$customUiManager->enableNotices();
$maniaControl->run(3);
var_dump($customUiManager->getShootManiaUIProperties()->getUiPropertiesObject()->notices);
$this->assertTrue($customUiManager->getShootManiaUIProperties()->getUiPropertiesObject()->notices->visible);
}
}