]> git.mxchange.org Git - friendica.git/blobdiff - tests/src/BaseObjectTest.php
Adding possibility to use a different cache-backend for locking and caching
[friendica.git] / tests / src / BaseObjectTest.php
index b2c73780a4499247544524f0f515636a1979f298..6935214527ef2a3b40a0a17656a17c1e12cba77b 100644 (file)
@@ -3,9 +3,8 @@
  * BaseObjectTest class.
  */
 
-namespace Friendica\Test;
+namespace Friendica\Test\src;
 
-use Friendica\App;
 use Friendica\BaseObject;
 use Friendica\Test\Util\AppMockTrait;
 use Friendica\Test\Util\VFSTrait;
@@ -13,8 +12,6 @@ use PHPUnit\Framework\TestCase;
 
 /**
  * Tests for the BaseObject class.
- * @runTestsInSeparateProcesses
- * @preserveGlobalState disabled
  */
 class BaseObjectTest extends TestCase
 {
@@ -26,44 +23,11 @@ class BaseObjectTest extends TestCase
         */
        private $baseObject;
 
-       /**
-        * Create variables used in tests.
-        */
-       protected function setUp()
-       {
-               $this->baseObject = new BaseObject();
-       }
-
-       /**
-        * Test the getApp() function.
-        * @return void
-        */
-       public function testGetApp()
-       {
-               $this->setUpVfsDir();
-               $configMock = \Mockery::mock('Friendica\Core\Config\ConfigCache');
-               $this->mockApp($this->root, $configMock);
-
-               $this->assertInstanceOf(App::class, $this->baseObject->getApp());
-       }
-
-       /**
-        * Test the setApp() function.
-        * @return void
-        */
-       public function testSetApp()
-       {
-               $this->setUpVfsDir();
-               $configMock = \Mockery::mock('Friendica\Core\Config\ConfigCache');
-               $this->mockApp($this->root, $configMock);
-
-               $this->assertNull($this->baseObject->setApp($this->app));
-               $this->assertEquals($this->app, $this->baseObject->getApp());
-       }
-
        /**
         * Test the getApp() function without App
         * @expectedException Friendica\Network\HTTPException\InternalServerErrorException
+        * @runInSeparateProcess
+        * @preserveGlobalState disabled
         */
        public function testGetAppFailed()
        {