AppTest.php 679 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. namespace OCA\Static\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('static');
  15. $this->container = $app->getContainer();
  16. }
  17. public function testAppInstalled() {
  18. $appManager = $this->container->query('OCP\App\IAppManager');
  19. $this->assertTrue($appManager->isInstalled('static'));
  20. }
  21. }