nextcloud-memento/tests/Integration/ AppTest.php
30 lines
682 B

  1. <?php
  2. namespace OCA\Memento\Tests\Integration\Controller;
  3. use OCP\AppFramework\App;
  4. use Test\TestCase;
  5. /**
  6. * This test shows how to make a small Integration Test. Query your class
  7. * directly from the container, only pass in mocks if needed and run your tests
  8. * against the database
  9. */
  10. class AppTest extends TestCase {
  11. private $container;
  12. public function setUp() {
  13. parent::setUp();
  14. $app = new App('memento');
  15. $this->container = $app->getContainer();
  16. }
  17. public function testAppInstalled() {
  18. $appManager = $this->container->query('OCP\App\IAppManager');
  19. $this->assertTrue($appManager->isInstalled('memento'));
  20. }
  21. }