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 $this->mockApp($this->root);
37 $this->baseObject = new BaseObject();
41 * Test the getApp() function.
44 public function testGetApp()
46 $this->assertInstanceOf(App::class, $this->baseObject->getApp());
50 * Test the setApp() function.
53 public function testSetApp()
55 $this->assertNull($this->baseObject->setApp($this->app));
56 $this->assertEquals($this->app, $this->baseObject->getApp());