Instantiate the App in test bootstrap
authorHypolite Petovan <mrpetovan@gmail.com>
Sat, 7 Jul 2018 01:20:29 +0000 (21:20 -0400)
committerHypolite Petovan <mrpetovan@gmail.com>
Mon, 16 Jul 2018 23:38:15 +0000 (19:38 -0400)
- Remove wrong App instantiation in Lock test

tests/bootstrap.php
tests/src/Core/Lock/LockTest.php

index 4474e4e..4b03aa2 100644 (file)
@@ -10,6 +10,8 @@ use PHPUnit\Framework\TestCase;
 require_once __DIR__.'/../boot.php';
 require_once __DIR__.'/../include/api.php';
 
+new App(dirname(__DIR__));
+
 // Backward compatibility
 if (!class_exists(TestCase::class)) {
        class_alias(PHPUnit_Framework_TestCase::class, TestCase::class);
index dafbd74..5e4bebd 100644 (file)
@@ -23,7 +23,7 @@ abstract class LockTest extends DatabaseTest
                $this->instance = $this->getInstance();
 
                // Reusable App object
-               $this->app = new App(__DIR__.'/../');
+               $this->app = \Friendica\BaseObject::getApp();
                $a = $this->app;
 
                // Default config