memories/tests/Integration/AppTest.php

30 lines
685 B
PHP
Raw Normal View History

2022-08-13 01:58:37 +00:00
<?php
2022-08-16 01:19:43 +00:00
namespace OCA\Polaroid\Tests\Integration\Controller;
2022-08-13 01:58:37 +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();
2022-08-16 01:19:43 +00:00
$app = new App('polaroid');
2022-08-13 01:58:37 +00:00
$this->container = $app->getContainer();
}
public function testAppInstalled() {
$appManager = $this->container->query('OCP\App\IAppManager');
2022-08-16 01:19:43 +00:00
$this->assertTrue($appManager->isInstalled('polaroid'));
2022-08-13 01:58:37 +00:00
}
}