first commit
This commit is contained in:
29
tests/Integration/AppTest.php
Normal file
29
tests/Integration/AppTest.php
Normal file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace OCA\MyWiki\Tests\Integration\Controller;
|
||||
|
||||
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;
|
||||
|
||||
protected function setUp(): void {
|
||||
parent::setUp();
|
||||
$app = new App('mywiki');
|
||||
$this->container = $app->getContainer();
|
||||
}
|
||||
|
||||
public function testAppInstalled() {
|
||||
$appManager = $this->container->query('OCP\App\IAppManager');
|
||||
$this->assertTrue($appManager->isInstalled('mywiki'));
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user