Added some PHPUnit Tests
This commit is contained in:
@ -1,16 +1,17 @@
|
||||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: Lukas
|
||||
* Date: 15. Apr. 2017
|
||||
* Time: 22:44
|
||||
*/
|
||||
|
||||
namespace Tests\core\Update;
|
||||
|
||||
use ManiaControl\ManiaControl;
|
||||
use ManiaControl\Utils\WebReader;
|
||||
|
||||
/**
|
||||
* PHP Unit Test for Plugin Update Manager Class
|
||||
*
|
||||
* @author ManiaControl Team <mail@maniacontrol.com>
|
||||
* @copyright 2014-2017 ManiaControl Team
|
||||
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
|
||||
*/
|
||||
class PluginUpdateManagerTest extends \PHPUnit_Framework_TestCase {
|
||||
public function testWebReaderAndPluginsWebservice() {
|
||||
$url = ManiaControl::URL_WEBSERVICE . 'plugins';
|
||||
@ -33,9 +34,11 @@ class PluginUpdateManagerTest extends \PHPUnit_Framework_TestCase {
|
||||
//No Plugins Running so No new Updates
|
||||
$this->assertFalse($pluginUpdateManager->getPluginsUpdates());
|
||||
|
||||
$maniaControl->run(5);
|
||||
$maniaControl->run(10);
|
||||
|
||||
$this->assertNotFalse($pluginUpdateManager->getPluginsUpdates());
|
||||
//$this->assertNotFalse($pluginUpdateManager->getPluginsUpdates()); //failed manchmal
|
||||
//TODO load Plugin manually and then test (could happen that no update is existing)
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user