Skip to content

Commit

Permalink
added debug to app test
Browse files Browse the repository at this point in the history
  • Loading branch information
rakshazi committed Jun 13, 2019
1 parent 4fd95fd commit 01f7003
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/AppTest.php
Expand Up @@ -11,27 +11,31 @@ class AppTest extends TestCase
public function testInit(): void
{
$dir = __DIR__.'/data/config';
\var_dump(['config dir' => $dir]);
$app = new \Wtf\App($dir);
$this->assertEquals($dir, $app->getContainer()->get('__wtf_config_path'));
}

public function testCustomProviders(): void
{
$dir = __DIR__.'/data/config';
\var_dump(['config dir' => $dir]);
$app = new \Wtf\App($dir);
$this->assertContains('\Wtf\Core\Tests\Dummy\Provider', $app->getContainer()->get('config')('wtf.providers', []));
}

public function testCustomMiddlewares(): void
{
$dir = __DIR__.'/data/config';
\var_dump(['config dir' => $dir]);
$app = new \Wtf\App($dir);
$this->assertContains('example_middleware', $app->getContainer()->get('config')('wtf.middlewares', []));
}

public function testProxiedMethods(): void
{
$dir = __DIR__.'/data/config';
\var_dump(['config dir' => $dir]);
$app = new \Wtf\App($dir);
$this->assertInstanceOf('Slim\Interfaces\RouteGroupInterface', $app->group('/', function ($group) { return $group; }));
$this->assertInstanceOf('Slim\Interfaces\RouteInterface', $app->any('/', function ($request, $response) { return $response; }));
Expand Down

0 comments on commit 01f7003

Please sign in to comment.