Integrate regression tests
Add regression testing for php: structure and bogus test. refs #4102
This commit is contained in:
parent
5df14b41e1
commit
a221568a84
|
@ -1,3 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<phpunit backupGlobals="true"
|
||||
backupStaticAttributes="true"
|
||||
colors="false"
|
||||
|
@ -13,10 +14,26 @@
|
|||
strict="false"
|
||||
verbose="false">
|
||||
|
||||
<logging>
|
||||
<log type="coverage-clover" target="../../build/log/phpunit_coverage.xml"/>
|
||||
<log type="junit" target="../../build/log/phpunit_results.xml" logIncompleteSkipped="true"/>
|
||||
</logging>
|
||||
<logging>
|
||||
<log type="coverage-clover" target="../../build/log/phpunit_coverage.xml"/>
|
||||
<log type="junit" target="../../build/log/phpunit_results.xml" logIncompleteSkipped="true"/>
|
||||
</logging>
|
||||
|
||||
</phpunit>
|
||||
<testsuites>
|
||||
<!--
|
||||
Unit testing
|
||||
-->
|
||||
<testsuite name="unit">
|
||||
<directory>application/</directory>
|
||||
<directory>bin/</directory>
|
||||
<directory>library/</directory>
|
||||
</testsuite>
|
||||
|
||||
<!--
|
||||
Regression testing
|
||||
-->
|
||||
<testsuite name="regression">
|
||||
<directory>regression/</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
</phpunit>
|
|
@ -0,0 +1,44 @@
|
|||
<?php
|
||||
/**
|
||||
* Icinga2-Web regression test
|
||||
* (c) 2013 Icinga Development Team
|
||||
*/
|
||||
|
||||
namespace Tests\Icinga\Regression;
|
||||
|
||||
/**
|
||||
* Class Bug4102
|
||||
*
|
||||
* Bogus regression test
|
||||
*
|
||||
* @see https://dev.icinga.org/issues/4102
|
||||
* @package Tests\Icinga\Regression
|
||||
*/
|
||||
class Bug4102Test extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* Test class name to match definition
|
||||
*/
|
||||
public function testClassName()
|
||||
{
|
||||
$class = get_class($this);
|
||||
$this->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);
|
||||
}
|
||||
}
|
|
@ -16,6 +16,6 @@ mkdir -p $DIR/../../build/log
|
|||
|
||||
cd $DIR
|
||||
|
||||
$PHPUNIT "$@" .
|
||||
$PHPUNIT "$@"
|
||||
|
||||
exit 0
|
||||
|
|
Loading…
Reference in New Issue