Add Unit Test example
This commit is contained in:
15
web/app/test/FooTest.php
Normal file
15
web/app/test/FooTest.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
namespace AppTest\Acme;
|
||||
|
||||
use App\Acme\Foo;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
class FooTest extends TestCase
|
||||
{
|
||||
public function testGetName()
|
||||
{
|
||||
$foo = new Foo();
|
||||
$this->assertEquals($foo->getName(), 'Nginx PHP MySQL');
|
||||
}
|
||||
}
|
||||
8
web/app/test/bootstrap.php
Normal file
8
web/app/test/bootstrap.php
Normal file
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
error_reporting(E_ALL | E_STRICT);
|
||||
|
||||
/**
|
||||
* Setup autoloading
|
||||
*/
|
||||
require __DIR__ . '/../vendor/autoload.php';
|
||||
Reference in New Issue
Block a user