Create a test container that we can use in any test

This commit is contained in:
Pierre Rudloff 2020-10-22 22:39:09 +02:00
parent d83774ae7d
commit 3d2b518cb4
16 changed files with 179 additions and 117 deletions

View file

@ -6,14 +6,17 @@
namespace Alltube\Test;
use Alltube\Exception\ConfigException;
use Alltube\Exception\DependencyException;
use Alltube\UglyRouter;
use Slim\Http\Environment;
use Slim\Http\Request;
use SmartyException;
/**
* Unit tests for the UglyRouter class.
*/
class UglyRouterTest extends BaseTest
class UglyRouterTest extends ContainerTest
{
/**
* UglyRouter instance.
@ -24,9 +27,15 @@ class UglyRouterTest extends BaseTest
/**
* Prepare tests.
*
* @throws ConfigException
* @throws DependencyException
* @throws SmartyException
*/
protected function setUp(): void
{
parent::setUp();
$this->router = new UglyRouter();
$this->router->map(['GET'], '/foo', 'print')->setName('foo');
}