mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-21 21:04:25 +02:00
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"
|
<phpunit backupGlobals="true"
|
||||||
backupStaticAttributes="true"
|
backupStaticAttributes="true"
|
||||||
colors="false"
|
colors="false"
|
||||||
@ -13,10 +14,26 @@
|
|||||||
strict="false"
|
strict="false"
|
||||||
verbose="false">
|
verbose="false">
|
||||||
|
|
||||||
<logging>
|
<logging>
|
||||||
<log type="coverage-clover" target="../../build/log/phpunit_coverage.xml"/>
|
<log type="coverage-clover" target="../../build/log/phpunit_coverage.xml"/>
|
||||||
<log type="junit" target="../../build/log/phpunit_results.xml" logIncompleteSkipped="true"/>
|
<log type="junit" target="../../build/log/phpunit_results.xml" logIncompleteSkipped="true"/>
|
||||||
</logging>
|
</logging>
|
||||||
|
|
||||||
|
<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>
|
</phpunit>
|
||||||
|
|
||||||
|
44
test/php/regression/Bug4102Test.php
Normal file
44
test/php/regression/Bug4102Test.php
Normal file
@ -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
|
cd $DIR
|
||||||
|
|
||||||
$PHPUNIT "$@" .
|
$PHPUNIT "$@"
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user