From a2674b2b303c6b2a5935638af04f0e4a61afae24 Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Thu, 20 Aug 2015 11:14:30 +0200 Subject: Additions to update page Apps to update and to disable will always be shown. Main title changes only when apps need updated, not core. Added bullet style. Exclude incompatible apps from updated apps list. --- tests/lib/app/manager.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'tests') diff --git a/tests/lib/app/manager.php b/tests/lib/app/manager.php index 248112722c4..7333d7601b1 100644 --- a/tests/lib/app/manager.php +++ b/tests/lib/app/manager.php @@ -212,9 +212,10 @@ class Manager extends \PHPUnit_Framework_TestCase { ->getMock(); $appInfos = [ - 'test1' => ['id' => 'test1', 'version' => '1.0.1', 'requiremax' => '8.0.0'], + 'test1' => ['id' => 'test1', 'version' => '1.0.1', 'requiremax' => '9.0.0'], 'test2' => ['id' => 'test2', 'version' => '1.0.0', 'requiremin' => '8.2.0'], 'test3' => ['id' => 'test3', 'version' => '1.2.4', 'requiremin' => '9.0.0'], + 'test4' => ['id' => 'test4', 'version' => '3.0.0', 'requiremin' => '8.1.0'], 'testnoversion' => ['id' => 'testnoversion', 'requiremin' => '8.2.0'], ]; @@ -232,12 +233,14 @@ class Manager extends \PHPUnit_Framework_TestCase { $this->appConfig->setValue('test2', 'installed_version', '1.0.0'); $this->appConfig->setValue('test3', 'enabled', 'yes'); $this->appConfig->setValue('test3', 'installed_version', '1.0.0'); + $this->appConfig->setValue('test4', 'enabled', 'yes'); + $this->appConfig->setValue('test4', 'installed_version', '2.4.0'); - $apps = $this->manager->getAppsNeedingUpgrade(); + $apps = $this->manager->getAppsNeedingUpgrade('8.2.0'); $this->assertCount(2, $apps); $this->assertEquals('test1', $apps[0]['id']); - $this->assertEquals('test3', $apps[1]['id']); + $this->assertEquals('test4', $apps[1]['id']); } public function testGetIncompatibleApps() { -- cgit v1.2.3