AppsAutoUpdater/tests/Integration/AppTest.php

30 lines
706 B
PHP
Raw Permalink Normal View History

2019-01-21 11:37:07 +00:00
<?php
2019-01-29 14:17:39 +00:00
namespace OCA\AppsAutoUpdater\Tests\Integration\Controller;
2019-01-21 11:37:07 +00:00
use OCP\AppFramework\App;
use Test\TestCase;
/**
* This test shows how to make a small Integration Test. Query your class
* directly from the container, only pass in mocks if needed and run your tests
* against the database
*/
class AppTest extends TestCase {
private $container;
public function setUp() {
parent::setUp();
2019-01-29 14:17:39 +00:00
$app = new App('appsautoupdater');
2019-01-21 11:37:07 +00:00
$this->container = $app->getContainer();
}
public function testAppInstalled() {
$appManager = $this->container->query('OCP\App\IAppManager');
2019-01-29 14:17:39 +00:00
$this->assertTrue($appManager->isInstalled('appsautoupdater'));
2019-01-21 11:37:07 +00:00
}
}