From 0c081d7fc93018955aed0204d6ca9a93c9dbc21f Mon Sep 17 00:00:00 2001 From: Vincent Letourneau Date: Mon, 23 Jan 2017 11:04:43 +0100 Subject: [PATCH] Add Unit Test example --- web/app/phpunit.xml.dist | 27 +++++++++++++++++++++++++++ web/app/src/Foo.php | 11 +++++++++++ web/app/test/FooTest.php | 15 +++++++++++++++ web/app/test/bootstrap.php | 8 ++++++++ 4 files changed, 61 insertions(+) create mode 100644 web/app/phpunit.xml.dist create mode 100644 web/app/src/Foo.php create mode 100644 web/app/test/FooTest.php create mode 100644 web/app/test/bootstrap.php diff --git a/web/app/phpunit.xml.dist b/web/app/phpunit.xml.dist new file mode 100644 index 0000000..184dd34 --- /dev/null +++ b/web/app/phpunit.xml.dist @@ -0,0 +1,27 @@ + + + + + + + ./test/ + + + + + + ./src + + ./vendor + + + + + + + + + \ No newline at end of file diff --git a/web/app/src/Foo.php b/web/app/src/Foo.php new file mode 100644 index 0000000..f94d679 --- /dev/null +++ b/web/app/src/Foo.php @@ -0,0 +1,11 @@ +assertEquals($foo->getName(), 'Nginx PHP MySQL'); + } +} diff --git a/web/app/test/bootstrap.php b/web/app/test/bootstrap.php new file mode 100644 index 0000000..5106c0e --- /dev/null +++ b/web/app/test/bootstrap.php @@ -0,0 +1,8 @@ +