]> git.mxchange.org Git - friendica.git/blob - tests/BaseObjectTest.php
Merge pull request #4888 from friendica/revert-4883-install_config
[friendica.git] / tests / BaseObjectTest.php
1 <?php
2 /**
3  * BaseObjectTest class.
4  */
5
6 namespace Friendica\Test;
7
8 use Friendica\App;
9 use Friendica\BaseObject;
10 use PHPUnit_Framework_TestCase;
11
12 /**
13  * Tests for the BaseObject class.
14  */
15 class BaseObjectTest extends PHPUnit_Framework_TestCase
16 {
17
18         /**
19          * Create variables used in tests.
20          */
21         protected function setUp()
22         {
23                 $this->baseObject = new BaseObject();
24         }
25
26         /**
27          * Test the getApp() function.
28          * @return void
29          */
30         public function testGetApp()
31         {
32                 $this->assertInstanceOf(App::class, $this->baseObject->getApp());
33         }
34
35         /**
36          * Test the setApp() function.
37          * @return void
38          */
39         public function testSetApp()
40         {
41                 $app = new App(__DIR__.'/../');
42                 $this->assertNull($this->baseObject->setApp($app));
43                 $this->assertEquals($app, $this->baseObject->getApp());
44         }
45 }