Add Unit Test example

This commit is contained in:
Vincent Letourneau
2017-01-23 11:04:43 +01:00
parent 394d2d360e
commit 0c081d7fc9
4 changed files with 61 additions and 0 deletions

15
web/app/test/FooTest.php Normal file
View 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');
}
}

View File

@@ -0,0 +1,8 @@
<?php
error_reporting(E_ALL | E_STRICT);
/**
* Setup autoloading
*/
require __DIR__ . '/../vendor/autoload.php';