TrackManiaControl/phpunittests/core/Manialinks/CustomUIManagerTest.php

46 lines
1.4 KiB
PHP
Raw Normal View History

<?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
* @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();
$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);
//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);
$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-22 08:27:40 +02:00
var_dump("test3");
var_dump($customUiManager->getShootManiaUIProperties()->getUiPropertiesObject()->notices);
2017-04-22 08:27:40 +02:00
$this->assertTrue($customUiManager->getShootManiaUIProperties()->getUiPropertiesObject()->notices->visible);*/
}
}