diff options
author | Morris Jobke <hey@morrisjobke.de> | 2017-11-24 10:41:51 +0100 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2017-11-25 12:01:02 +0100 |
commit | df61d43529418aace241b99be106ff9a35188dac (patch) | |
tree | 1dee18bbed4828e67b96f87c41f3a43f799fd822 /tests/Settings | |
parent | 0e2f00ec59424b2ef5708a928856e2c75abe6deb (diff) | |
download | nextcloud-server-df61d43529418aace241b99be106ff9a35188dac.tar.gz nextcloud-server-df61d43529418aace241b99be106ff9a35188dac.zip |
Make isUpdateAvailable non-static
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'tests/Settings')
-rw-r--r-- | tests/Settings/Controller/AppSettingsControllerTest.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/Settings/Controller/AppSettingsControllerTest.php b/tests/Settings/Controller/AppSettingsControllerTest.php index e264d0dfbfe..6631873d8ad 100644 --- a/tests/Settings/Controller/AppSettingsControllerTest.php +++ b/tests/Settings/Controller/AppSettingsControllerTest.php @@ -25,6 +25,7 @@ namespace Tests\Settings\Controller; use OC\App\AppStore\Bundles\BundleFetcher; use OC\App\AppStore\Fetcher\AppFetcher; use OC\App\AppStore\Fetcher\CategoryFetcher; +use OC\Installer; use OC\Settings\Controller\AppSettingsController; use OCP\AppFramework\Http\ContentSecurityPolicy; use OCP\AppFramework\Http\JSONResponse; @@ -63,6 +64,8 @@ class AppSettingsControllerTest extends TestCase { private $l10nFactory; /** @var BundleFetcher|\PHPUnit_Framework_MockObject_MockObject */ private $bundleFetcher; + /** @var Installer|\PHPUnit_Framework_MockObject_MockObject */ + private $installer; public function setUp() { parent::setUp(); @@ -79,6 +82,7 @@ class AppSettingsControllerTest extends TestCase { $this->appFetcher = $this->createMock(AppFetcher::class); $this->l10nFactory = $this->createMock(IFactory::class); $this->bundleFetcher = $this->createMock(BundleFetcher::class); + $this->installer = $this->createMock(Installer::class); $this->appSettingsController = new AppSettingsController( 'settings', @@ -90,11 +94,15 @@ class AppSettingsControllerTest extends TestCase { $this->categoryFetcher, $this->appFetcher, $this->l10nFactory, - $this->bundleFetcher + $this->bundleFetcher, + $this->installer ); } public function testListCategories() { + $this->installer->expects($this->any()) + ->method('isUpdateAvailable') + ->willReturn(false); $expected = new JSONResponse([ [ 'id' => 2, |