You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
flight-core/tests/documentation/AutoloadingTest.php

28 lines
747 B

<?php
use app\utils\ArrayHelperUtil;
use PHPUnit\Framework\TestCase;
class AutoloadingTest extends TestCase
{
public function testBasicExample(): void
{
require __DIR__ . '/autoloading-example/public/index.php';
$this->assertTrue(class_exists('MyController'));
$this->expectOutputString('Doing something');
(new MyController)->index();
}
public function testNamespaces(): void {
Flight::path(__DIR__ . '/autoloading-example');
$this->assertTrue(class_exists('app\utils\ArrayHelperUtil'));
$this->assertTrue(class_exists('app\controllers\MyController'));
$this->expectOutputString('Doing something');
(new ArrayHelperUtil)->changeArrayCase([]);
}
}