From 1f1a3930b238b5773ca23f0e3dfb6702b0928549 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Fri, 6 Jul 2018 21:20:29 -0400 Subject: [PATCH] Instantiate the App in test bootstrap - Remove wrong App instantiation in Lock test --- tests/bootstrap.php | 2 ++ tests/src/Core/Lock/LockTest.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 4474e4ee8e..4b03aa246b 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -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); diff --git a/tests/src/Core/Lock/LockTest.php b/tests/src/Core/Lock/LockTest.php index dafbd74a6f..5e4bebd45c 100644 --- a/tests/src/Core/Lock/LockTest.php +++ b/tests/src/Core/Lock/LockTest.php @@ -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