46 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			46 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
<?php
 | 
						|
 | 
						|
use ManiaControl\ManiaControl;
 | 
						|
 | 
						|
/**
 | 
						|
 * PHP Unit Test for Custom UI Manager
 | 
						|
 *
 | 
						|
 * @author    ManiaControl Team <mail@maniacontrol.com>
 | 
						|
 * @copyright 2014-2018 ManiaControl Team
 | 
						|
 * @license   http://www.gnu.org/licenses/ GNU General Public License, Version 3
 | 
						|
 */
 | 
						|
class CustomUIManagerTest extends PHPUnit_Framework_TestCase {
 | 
						|
	public function testUiProperties() { //FIXME this test does not work at all at the moment
 | 
						|
		/*$maniaControl = new ManiaControl();
 | 
						|
		$maniaControl->connect();
 | 
						|
 | 
						|
		$customUiManager = $maniaControl->getManialinkManager()->getCustomUIManager();
 | 
						|
		$maniaControl->run(4);
 | 
						|
 | 
						|
		var_dump("test1");
 | 
						|
		var_dump($customUiManager->getShootManiaUIProperties()->getUiPropertiesObject()->notices);
 | 
						|
 | 
						|
		//Connect Again and Disable Notices
 | 
						|
		$maniaControl->connect();
 | 
						|
		$customUiManager->disableNotices();
 | 
						|
 | 
						|
		$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();
 | 
						|
 | 
						|
		$maniaControl->run(4);
 | 
						|
 | 
						|
		var_dump("test3");
 | 
						|
		var_dump($customUiManager->getShootManiaUIProperties()->getUiPropertiesObject()->notices);
 | 
						|
		$this->assertTrue($customUiManager->getShootManiaUIProperties()->getUiPropertiesObject()->notices->visible);*/
 | 
						|
 | 
						|
	}
 | 
						|
}
 |