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');
14 use \PHPUnit_Framework_TestCase;
16 * Tests for the BaseObject class.
18 class BaseObjectTest extends \PHPUnit\Framework\TestCase
22 * Create variables used in tests.
24 protected function setUp()
26 $this->baseObject = new BaseObject();
30 * Test the getApp() function.
33 public function testGetApp()
35 $this->assertInstanceOf(App::class, $this->baseObject->getApp());
39 * Test the setApp() function.
42 public function testSetApp()
44 $app = new App(__DIR__.'/../');
45 $this->assertNull($this->baseObject->setApp($app));
46 $this->assertEquals($app, $this->baseObject->getApp());