SimpleAppTest.php 723 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. namespace Goodquestiondev\Tests;
  3. require_once __DIR__ . '/../vendor/autoload.php';
  4. use PHPUnit\Framework\TestCase;
  5. use Goodquestiondev\Application;
  6. class SimpleAppTest extends TestCase
  7. {
  8. public function testApplicationPublicPath(): void
  9. {
  10. $app = new Application(dirname(__DIR__));
  11. $this->assertEquals(dirname(__DIR__).'/public', $app->publicPath());
  12. }
  13. public function testControllerUris(): void
  14. {
  15. $app = new Application(dirname(__DIR__));
  16. $this->assertEquals([
  17. 'categories.posts' => 'CategoriesPostsController',
  18. 'posts' => 'PostsController',
  19. 'users.posts' => 'UsersPostsController'
  20. ], $app->controllerUris);
  21. }
  22. }