3 * BaseObjectTest class.
6 namespace Friendica\Test;
9 use Friendica\BaseObject;
10 use Friendica\Test\Util\AppMockTrait;
11 use Friendica\Test\Util\VFSTrait;
12 use PHPUnit\Framework\TestCase;
15 * Tests for the BaseObject class.
16 * @runTestsInSeparateProcesses
17 * @preserveGlobalState disabled
19 class BaseObjectTest extends TestCase
30 * Create variables used in tests.
32 protected function setUp()
35 $configMock = \Mockery::mock('Friendica\Core\Config\ConfigCache');
36 $this->mockApp($this->root, $configMock);
38 $this->baseObject = new BaseObject();
42 * Test the getApp() function.
45 public function testGetApp()
47 $this->assertInstanceOf(App::class, $this->baseObject->getApp());
51 * Test the setApp() function.
54 public function testSetApp()
56 $this->assertNull($this->baseObject->setApp($this->app));
57 $this->assertEquals($this->app, $this->baseObject->getApp());