Frio - bugfix - don't show new event button if the button isn't available
[friendica.git/.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 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 }