mirror of
https://github.com/kevinveenbirkenbach/coding-challenge-online-shop.git
synced 2025-09-10 11:57:12 +02:00
Added Core and test
This commit is contained in:
44
src/core/CoreTest.php
Normal file
44
src/core/CoreTest.php
Normal 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());
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user