BaseTestCase: Inherit from `Mockery\Adapter\Phpunit\MockeryTestCase`
This commit is contained in:
parent
cb87190138
commit
bc1c967dec
|
@ -23,7 +23,6 @@ namespace Icinga\Test {
|
|||
use Exception;
|
||||
use RuntimeException;
|
||||
use Mockery;
|
||||
use PHPUnit_Framework_TestCase;
|
||||
use Icinga\Application\Icinga;
|
||||
use Icinga\Data\ConfigObject;
|
||||
use Icinga\Data\ResourceFactory;
|
||||
|
@ -32,7 +31,7 @@ namespace Icinga\Test {
|
|||
/**
|
||||
* Class BaseTestCase
|
||||
*/
|
||||
abstract class BaseTestCase extends PHPUnit_Framework_TestCase implements DbTest
|
||||
abstract class BaseTestCase extends Mockery\Adapter\Phpunit\MockeryTestCase implements DbTest
|
||||
{
|
||||
/**
|
||||
* Path to application/
|
||||
|
|
|
@ -36,10 +36,6 @@ if (file_exists($vendorAutoload)) {
|
|||
|
||||
require_once($icingaLibPath . '/Test/ClassLoader.php');
|
||||
|
||||
if (! class_exists('PHPUnit_Framework_TestCase')) {
|
||||
require_once __DIR__ . '/phpunit-compat.php';
|
||||
}
|
||||
|
||||
$loader = new Icinga\Test\ClassLoader();
|
||||
$loader->registerNamespace('Tests', $testLibraryPath);
|
||||
$loader->registerNamespace('Icinga', $icingaLibPath);
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* @codingStandardsIgnoreStart
|
||||
*/
|
||||
class PHPUnit_Framework_TestCase extends \PHPUnit\Framework\TestCase
|
||||
{
|
||||
}
|
||||
|
||||
interface PHPUnit_Framework_Test extends \PHPUnit\Framework\Test
|
||||
{
|
||||
}
|
||||
|
||||
interface PHPUnit_Framework_TestListener extends \PHPUnit\Framework\TestListener
|
||||
{
|
||||
}
|
|
@ -1,42 +0,0 @@
|
|||
<?php
|
||||
/* Icinga Web 2 | (c) 2013 Icinga Development Team | GPLv2+ */
|
||||
|
||||
namespace Tests\Icinga\Regression;
|
||||
|
||||
use Icinga\Test\BaseTestCase;
|
||||
|
||||
/**
|
||||
* Class Bug4102
|
||||
*
|
||||
* Bogus regression test
|
||||
*
|
||||
* @see https://dev.icinga.com/issues/4102
|
||||
*/
|
||||
class Bug4102Test extends BaseTestCase
|
||||
{
|
||||
/**
|
||||
* 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);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue