From a221568a848c0c583c017ea21df64614f549b6c2 Mon Sep 17 00:00:00 2001 From: Marius Hein Date: Tue, 4 Jun 2013 15:55:44 +0200 Subject: [PATCH] Integrate regression tests Add regression testing for php: structure and bogus test. refs #4102 --- test/php/phpunit.xml | 27 ++++++++++++++---- test/php/regression/Bug4102Test.php | 44 +++++++++++++++++++++++++++++ test/php/runtests.sh | 2 +- 3 files changed, 67 insertions(+), 6 deletions(-) create mode 100644 test/php/regression/Bug4102Test.php diff --git a/test/php/phpunit.xml b/test/php/phpunit.xml index d56bbb063..f685c4ff0 100644 --- a/test/php/phpunit.xml +++ b/test/php/phpunit.xml @@ -1,3 +1,4 @@ + - - - - + + + + - + + + + application/ + bin/ + library/ + + + + regression/ + + + \ No newline at end of file diff --git a/test/php/regression/Bug4102Test.php b/test/php/regression/Bug4102Test.php new file mode 100644 index 000000000..dd232ac73 --- /dev/null +++ b/test/php/regression/Bug4102Test.php @@ -0,0 +1,44 @@ +assertContains('Bug4102Test', $class); + } + + /** + * Test namespace to match definition + */ + public function testNamespace() + { + $namespace = __NAMESPACE__; + $this->assertEquals('Tests\Icinga\Regression', $namespace); + } + + /** + * Test phpunit inheritance + */ + public function testInheritance() + { + $this->assertInstanceOf('\PHPUnit_Framework_TestCase', $this); + } +} diff --git a/test/php/runtests.sh b/test/php/runtests.sh index 0caa34742..7c07792ee 100755 --- a/test/php/runtests.sh +++ b/test/php/runtests.sh @@ -16,6 +16,6 @@ mkdir -p $DIR/../../build/log cd $DIR -$PHPUNIT "$@" . +$PHPUNIT "$@" exit 0