3 * BaseObjectTest class.
6 namespace Friendica\Test;
9 use Friendica\BaseObject;
10 // backward compatibility
11 if (!class_exists('\PHPUnit\Framework\TestCase')) {
12 class_alias('\PHPUnit_Framework_TestCase', '\PHPUnit\Framework\TestCase');
15 * Tests for the BaseObject class.
17 class BaseObjectTest extends \PHPUnit\Framework\TestCase
21 * Create variables used in tests.
23 protected function setUp()
25 $this->baseObject = new BaseObject();
29 * Test the getApp() function.
32 public function testGetApp()
34 $this->assertInstanceOf(App::class, $this->baseObject->getApp());
38 * Test the setApp() function.
41 public function testSetApp()
43 $app = new App(__DIR__.'/../');
44 $this->assertNull($this->baseObject->setApp($app));
45 $this->assertEquals($app, $this->baseObject->getApp());