Added Core and test

This commit is contained in:
Kevin Frantz
2018-07-14 16:52:17 +02:00
parent d79616c3ae
commit b11cea5337
3 changed files with 138 additions and 0 deletions

44
src/core/CoreTest.php Normal file
View File

@@ -0,0 +1,44 @@
<?php
namespace core;
use PHPUnit\Framework\TestCase;
use entity\user\User;
/**
*
* @author kevinfrantz
*
*/
class CoreTest extends TestCase
{
/**
*
* @var Core
*/
protected $core;
/**
*
* @var User
*/
protected $user;
protected function setUp():void{
$this->core = new Core();
$this->user = new User();
$this->core->setUser($this->user);
}
public function testTwig():void{
$this->assertInstanceOf(\Twig_Environment::class, $this->core->getTwig());
}
public function testDatabase():void{
$this->assertInstanceOf(\PDO::class, $this->core->getDatabase());
}
public function testUser():void{
$this->assertEquals($this->user, $this->core->getUser());
}
}