Commit dfb44bda authored by Marco Pivetta's avatar Marco Pivetta

Merge pull request #778 from deeky666/cleanup-phpunit-testsuite-init

[DBAL-1122] Cleanup PHPUnit test suite bootstrap
parents 9e7a971c d4b2930e
......@@ -22,8 +22,6 @@ namespace Doctrine\Tests\DBAL;
use Doctrine\DBAL\Configuration;
use Doctrine\Tests\DbalTestCase;
require_once __DIR__ . '/../TestInit.php';
/**
* Unit tests for the configuration container.
*
......
......@@ -2,8 +2,6 @@
namespace Doctrine\Tests\DBAL;
require_once __DIR__ . '/../TestInit.php';
use Doctrine\Common\EventManager;
use Doctrine\DBAL\Configuration;
use Doctrine\DBAL\Connection;
......
......@@ -2,8 +2,6 @@
namespace Doctrine\Tests\DBAL;
require_once __DIR__ . '/../../../TestInit.php';
class OCI8StatementTest extends \Doctrine\Tests\DbalTestCase
{
public function setUp()
......
......@@ -2,8 +2,6 @@
namespace Doctrine\Tests\DBAL;
require_once __DIR__ . '/../TestInit.php';
class DriverManagerTest extends \Doctrine\Tests\DbalTestCase
{
/**
......@@ -114,7 +112,7 @@ class DriverManagerTest extends \Doctrine\Tests\DbalTestCase
$conn = \Doctrine\DBAL\DriverManager::getConnection($options);
$this->assertInstanceOf('Doctrine\DBAL\Driver\PDOMySql\Driver', $conn->getDriver());
}
/**
* @dataProvider databaseUrls
*/
......@@ -123,13 +121,13 @@ class DriverManagerTest extends \Doctrine\Tests\DbalTestCase
$options = is_array($url) ? $url : array(
'url' => $url,
);
if ($expected === false) {
$this->setExpectedException('Doctrine\DBAL\DBALException');
}
$conn = \Doctrine\DBAL\DriverManager::getConnection($options);
$params = $conn->getParams();
foreach ($expected as $key => $value) {
if ($key == 'driver') {
......@@ -139,7 +137,7 @@ class DriverManagerTest extends \Doctrine\Tests\DbalTestCase
}
}
}
public function databaseUrls()
{
return array(
......
......@@ -7,8 +7,6 @@ use Doctrine\DBAL\Event\Listeners\MysqlSessionInit;
use Doctrine\DBAL\Events;
use Doctrine\Tests\DbalTestCase;
require_once __DIR__ . '/../../TestInit.php';
class MysqlSessionInitTest extends DbalTestCase
{
public function testPostConnect()
......
......@@ -7,8 +7,6 @@ use Doctrine\DBAL\Event\Listeners\OracleSessionInit;
use Doctrine\DBAL\Events;
use Doctrine\Tests\DbalTestCase;
require_once __DIR__ . '/../../TestInit.php';
class OracleSessionInitTest extends DbalTestCase
{
public function testPostConnect()
......
......@@ -7,8 +7,6 @@ use Doctrine\DBAL\Event\Listeners\SQLSessionInit;
use Doctrine\DBAL\Events;
use Doctrine\Tests\DbalTestCase;
require_once __DIR__ . '/../../TestInit.php';
/**
* @group DBAL-169
*/
......
......@@ -5,8 +5,6 @@ namespace Doctrine\Tests\DBAL\Functional;
use Doctrine\DBAL\Types\Type;
use PDO;
require_once __DIR__ . '/../../TestInit.php';
/**
* @group DBAL-6
*/
......
......@@ -6,8 +6,6 @@ use Doctrine\DBAL\ConnectionException;
use Doctrine\DBAL\DriverManager;
use Doctrine\DBAL\Types\Type;
require_once __DIR__ . '/../../TestInit.php';
class ConnectionTest extends \Doctrine\Tests\DbalFunctionalTestCase
{
public function setUp()
......
......@@ -7,8 +7,6 @@ use Doctrine\DBAL\Platforms\AbstractPlatform;
use Doctrine\DBAL\Types\Type;
use PDO;
require_once __DIR__ . '/../../TestInit.php';
class DataAccessTest extends \Doctrine\Tests\DbalFunctionalTestCase
{
static private $generated = false;
......
......@@ -2,8 +2,6 @@
namespace Doctrine\Tests\DBAL\Functional;
require_once __DIR__ . '/../../TestInit.php';
class ModifyLimitQueryTest extends \Doctrine\Tests\DbalFunctionalTestCase
{
private static $tableCreated = false;
......
......@@ -5,9 +5,6 @@ namespace Doctrine\Tests\DBAL\Functional\Ticket;
use Doctrine\DBAL\Connection;
use PDO;
require_once __DIR__ . '/../../TestInit.php';
/**
* @group DDC-1372
*/
......
......@@ -7,8 +7,6 @@ use Doctrine\DBAL\DriverManager;
use Doctrine\DBAL\Portability\Connection as ConnectionPortability;
use PDO;
require_once __DIR__ . '/../../TestInit.php';
/**
* @group DBAL-56
*/
......
......@@ -4,8 +4,6 @@ namespace Doctrine\Tests\DBAL\Functional;
use Doctrine\DBAL\Cache\QueryCacheProfile;
use PDO;
require_once __DIR__ . '/../../TestInit.php';
/**
* @group DDC-217
*/
......@@ -64,7 +62,7 @@ class ResultCacheTest extends \Doctrine\Tests\DbalFunctionalTestCase
}
$this->assertCacheNonCacheSelectSameFetchModeAreEqual($expectedResult, \PDO::FETCH_BOTH);
}
public function testFetchColumn()
{
$expectedResult = array();
......
......@@ -2,8 +2,6 @@
namespace Doctrine\Tests\DBAL\Functional\Schema;
require_once __DIR__ . '/../../../TestInit.php';
class Db2SchemaManagerTest extends SchemaManagerFunctionalTestCase
{
......
......@@ -4,8 +4,6 @@ namespace Doctrine\Tests\DBAL\Functional\Schema;
use Doctrine\DBAL\Schema\Table;
require_once __DIR__ . '/../../../TestInit.php';
class DrizzleSchemaManagerTest extends SchemaManagerFunctionalTestCase
{
public function testListTableWithBinary()
......
......@@ -8,8 +8,6 @@ use Doctrine\DBAL\Schema\Schema;
use Doctrine\DBAL\Schema\Table;
use Doctrine\DBAL\Types\Type;
require_once __DIR__ . '/../../../TestInit.php';
class MySqlSchemaManagerTest extends SchemaManagerFunctionalTestCase
{
protected function setUp()
......
......@@ -5,8 +5,6 @@ namespace Doctrine\Tests\DBAL\Functional\Schema;
use Doctrine\DBAL\Schema;
use Doctrine\Tests\TestUtil;
require_once __DIR__ . '/../../../TestInit.php';
class OracleSchemaManagerTest extends SchemaManagerFunctionalTestCase
{
public function setUp()
......
......@@ -6,8 +6,6 @@ use Doctrine\DBAL\Platforms\AbstractPlatform;
use Doctrine\DBAL\Schema;
use Doctrine\DBAL\Types\Type;
require_once __DIR__ . '/../../../TestInit.php';
class PostgreSqlSchemaManagerTest extends SchemaManagerFunctionalTestCase
{
public function tearDown()
......
......@@ -11,8 +11,6 @@ use Doctrine\DBAL\Schema\Table;
use Doctrine\DBAL\Schema\TableDiff;
use Doctrine\DBAL\Types\Type;
require_once __DIR__ . '/../../../TestInit.php';
class SchemaManagerFunctionalTestCase extends \Doctrine\Tests\DbalFunctionalTestCase
{
/**
......
......@@ -4,8 +4,6 @@ namespace Doctrine\Tests\DBAL\Functional\Schema;
use Doctrine\DBAL\Schema;
require_once __DIR__ . '/../../../TestInit.php';
class SqliteSchemaManagerTest extends SchemaManagerFunctionalTestCase
{
/**
......
......@@ -4,8 +4,6 @@ namespace Doctrine\Tests\DBAL\Functional;
use Doctrine\DBAL\Types\Type;
require_once __DIR__ . '/../../TestInit.php';
class TypeConversionTest extends \Doctrine\Tests\DbalFunctionalTestCase
{
static private $typeCounter = 0;
......
......@@ -2,8 +2,6 @@
namespace Doctrine\Tests\DBAL\Logging;
require_once __DIR__ . '/../../TestInit.php';
class DebugStackTest extends \Doctrine\Tests\DbalTestCase
{
public function setUp()
......
......@@ -9,8 +9,6 @@ use Doctrine\DBAL\Schema\ForeignKeyConstraint;
use Doctrine\DBAL\Schema\Table;
use Doctrine\DBAL\Types\Type;
require_once __DIR__ . '/../../TestInit.php';
class OraclePlatformTest extends AbstractPlatformTestCase
{
static public function dataValidIdentifiers()
......
......@@ -9,8 +9,6 @@ use Doctrine\DBAL\Schema\Table;
use Doctrine\DBAL\Schema\TableDiff;
use Doctrine\DBAL\Types\Type;
require_once __DIR__ . '/../../TestInit.php';
class SqlitePlatformTest extends AbstractPlatformTestCase
{
public function createPlatform()
......
......@@ -5,8 +5,6 @@ namespace Doctrine\Tests\DBAL\Portability;
use Doctrine\DBAL\Portability\Connection;
use Doctrine\DBAL\Portability\Statement;
require_once __DIR__ . '/../../TestInit.php';
class StatementTest extends \Doctrine\Tests\DbalTestCase
{
/**
......
......@@ -4,8 +4,6 @@ namespace Doctrine\Tests\DBAL\Query\Expression;
use Doctrine\DBAL\Query\Expression\CompositeExpression;
require_once __DIR__ . '/../../../TestInit.php';
/**
* @group DBAL-12
*/
......
......@@ -5,8 +5,6 @@ namespace Doctrine\Tests\DBAL\Query\Expression;
use Doctrine\DBAL\Query\Expression\CompositeExpression;
use Doctrine\DBAL\Query\Expression\ExpressionBuilder;
require_once __DIR__ . '/../../../TestInit.php';
/**
* @group DBAL-12
*/
......
......@@ -5,8 +5,6 @@ namespace Doctrine\Tests\DBAL\Query;
use Doctrine\DBAL\Query\Expression\ExpressionBuilder;
use Doctrine\DBAL\Query\QueryBuilder;
require_once __DIR__ . '/../../TestInit.php';
/**
* @group DBAL-12
*/
......
......@@ -5,8 +5,6 @@ namespace Doctrine\Tests\DBAL;
use Doctrine\DBAL\Connection;
use Doctrine\DBAL\SQLParserUtils;
require_once __DIR__ . '/../TestInit.php';
/**
* @group DBAL-78
* @group DDC-1372
......
......@@ -2,8 +2,6 @@
namespace Doctrine\Tests\DBAL\Schema;
require_once __DIR__ . '/../../TestInit.php';
use Doctrine\DBAL\Schema\Column;
use Doctrine\DBAL\Types\Type;
......
......@@ -19,8 +19,6 @@
namespace Doctrine\Tests\DBAL\Schema;
require_once __DIR__ . '/../../TestInit.php';
use Doctrine\DBAL\Schema\Column;
use Doctrine\DBAL\Schema\ColumnDiff;
use Doctrine\DBAL\Schema\Comparator;
......
......@@ -2,8 +2,6 @@
namespace Doctrine\Tests\DBAL\Schema;
require_once __DIR__ . '/../../TestInit.php';
use Doctrine\DBAL\Schema\Index;
class IndexTest extends \PHPUnit_Framework_TestCase
......
......@@ -2,8 +2,6 @@
namespace Doctrine\Tests\DBAL\Schema\Platforms;
require_once __DIR__ . '/../../../TestInit.php';
use Doctrine\DBAL\Schema\Table;
class MySQLSchemaTest extends \PHPUnit_Framework_TestCase
......
......@@ -2,8 +2,6 @@
namespace Doctrine\Tests\DBAL\Schema;
require_once __DIR__ . '/../../TestInit.php';
use Doctrine\DBAL\Schema\SchemaDiff;
use Doctrine\DBAL\Schema\Sequence;
use Doctrine\DBAL\Schema\Table;
......
......@@ -2,8 +2,6 @@
namespace Doctrine\Tests\DBAL\Schema;
require_once __DIR__ . '/../../TestInit.php';
use Doctrine\DBAL\Schema\Schema;
use Doctrine\DBAL\Schema\Sequence;
use Doctrine\DBAL\Schema\Table;
......
......@@ -2,8 +2,6 @@
namespace Doctrine\Tests\DBAL\Schema\Visitor;
require_once __DIR__ . '/../../../TestInit.php';
use Doctrine\DBAL\Schema\Schema;
class SchemaSqlCollectorTest extends \PHPUnit_Framework_TestCase
......
......@@ -5,8 +5,6 @@ namespace Doctrine\Tests\DBAL\Types;
use Doctrine\DBAL\Types\Type;
use Doctrine\Tests\DBAL\Mocks\MockPlatform;
require_once __DIR__ . '/../../TestInit.php';
class ArrayTest extends \Doctrine\Tests\DbalTestCase
{
protected
......
......@@ -5,8 +5,6 @@ namespace Doctrine\Tests\DBAL\Types;
use Doctrine\DBAL\Types\Type;
use Doctrine\Tests\DBAL\Mocks\MockPlatform;
require_once __DIR__ . '/../../TestInit.php';
class BinaryTest extends \Doctrine\Tests\DbalTestCase
{
/**
......
......@@ -5,8 +5,6 @@ namespace Doctrine\Tests\DBAL\Types;
use Doctrine\DBAL\Types\Type;
use Doctrine\Tests\DBAL\Mocks\MockPlatform;
require_once __DIR__ . '/../../TestInit.php';
class BlobTest extends \Doctrine\Tests\DbalTestCase
{
/**
......
......@@ -5,8 +5,6 @@ namespace Doctrine\Tests\DBAL\Types;
use Doctrine\DBAL\Types\Type;
use Doctrine\Tests\DBAL\Mocks\MockPlatform;
require_once __DIR__ . '/../../TestInit.php';
class BooleanTest extends \Doctrine\Tests\DbalTestCase
{
protected
......
......@@ -5,8 +5,6 @@ namespace Doctrine\Tests\DBAL\Types;
use Doctrine\DBAL\Types\Type;
use Doctrine\Tests\DBAL\Mocks\MockPlatform;
require_once __DIR__ . '/../../TestInit.php';
class DateTest extends \Doctrine\Tests\DbalTestCase
{
protected
......
......@@ -5,8 +5,6 @@ namespace Doctrine\Tests\DBAL\Types;
use Doctrine\DBAL\Types\Type;
use Doctrine\Tests\DBAL\Mocks\MockPlatform;
require_once __DIR__ . '/../../TestInit.php';
class DateTimeTest extends \Doctrine\Tests\DbalTestCase
{
protected
......
......@@ -5,8 +5,6 @@ namespace Doctrine\Tests\DBAL\Types;
use Doctrine\DBAL\Types\Type;
use Doctrine\Tests\DBAL\Mocks\MockPlatform;
require_once __DIR__ . '/../../TestInit.php';
class DateTimeTzTest extends \Doctrine\Tests\DbalTestCase
{
protected
......
......@@ -5,8 +5,6 @@ namespace Doctrine\Tests\DBAL\Types;
use Doctrine\DBAL\Types\Type;
use Doctrine\Tests\DBAL\Mocks\MockPlatform;
require_once __DIR__ . '/../../TestInit.php';
class DecimalTest extends \Doctrine\Tests\DbalTestCase
{
protected
......
......@@ -5,8 +5,6 @@ namespace Doctrine\Tests\DBAL\Types;
use Doctrine\DBAL\Types\Type;
use Doctrine\Tests\DBAL\Mocks\MockPlatform;
require_once __DIR__ . '/../../TestInit.php';
class FloatTest extends \Doctrine\Tests\DbalTestCase
{
protected $_platform, $_type;
......
......@@ -5,8 +5,6 @@ namespace Doctrine\Tests\DBAL\Types;
use Doctrine\DBAL\Types\Type;
use Doctrine\Tests\DBAL\Mocks\MockPlatform;
require_once __DIR__ . '/../../TestInit.php';
class IntegerTest extends \Doctrine\Tests\DbalTestCase
{
protected
......
......@@ -5,8 +5,6 @@ namespace Doctrine\Tests\DBAL\Types;
use Doctrine\DBAL\Types\Type;
use Doctrine\Tests\DBAL\Mocks\MockPlatform;
require_once __DIR__ . '/../../TestInit.php';
class JsonArrayTest extends \Doctrine\Tests\DbalTestCase
{
/**
......
......@@ -5,8 +5,6 @@ namespace Doctrine\Tests\DBAL\Types;
use Doctrine\DBAL\Types\Type;
use Doctrine\Tests\DBAL\Mocks\MockPlatform;
require_once __DIR__ . '/../../TestInit.php';
class ObjectTest extends \Doctrine\Tests\DbalTestCase
{
protected
......
......@@ -5,8 +5,6 @@ namespace Doctrine\Tests\DBAL\Types;
use Doctrine\DBAL\Types\Type;
use Doctrine\Tests\DBAL\Mocks\MockPlatform;
require_once __DIR__ . '/../../TestInit.php';
class SmallIntTest extends \Doctrine\Tests\DbalTestCase
{
protected
......
......@@ -5,8 +5,6 @@ namespace Doctrine\Tests\DBAL\Types;
use Doctrine\DBAL\Types\Type;
use Doctrine\Tests\DBAL\Mocks\MockPlatform;
require_once __DIR__ . '/../../TestInit.php';
class StringTest extends \Doctrine\Tests\DbalTestCase
{
protected
......
......@@ -5,8 +5,6 @@ namespace Doctrine\Tests\DBAL\Types;
use Doctrine\DBAL\Types\Type;
use Doctrine\Tests\DBAL\Mocks\MockPlatform;
require_once __DIR__ . '/../../TestInit.php';
class TimeTest extends \Doctrine\Tests\DbalTestCase
{
protected
......
......@@ -5,8 +5,6 @@ namespace Doctrine\Tests\DBAL\Types;
use Doctrine\DBAL\Types\Type;
use Doctrine\Tests\DBAL\Mocks\MockPlatform;
require_once __DIR__ . '/../../TestInit.php';
class VarDateTimeTest extends \Doctrine\Tests\DbalTestCase
{
protected
......
......@@ -2,8 +2,6 @@
namespace Doctrine\Tests\DBAL;
require_once __DIR__ . '/../TestInit.php';
class UtilTest extends \Doctrine\Tests\DbalTestCase
{
static public function dataConvertPositionalToNamedParameters()
......
<?xml version="1.0" encoding="utf-8"?>
<phpunit>
<phpunit bootstrap="../Doctrine/Tests/TestInit.php">
<php>
<var name="db_type" value="pdo_mysql"/>
<var name="db_host" value="localhost" />
......@@ -17,7 +17,7 @@
<testsuites>
<testsuite name="Doctrine DBAL Test Suite">
<directory>./../Doctrine/Tests/DBAL</directory>
<directory>../Doctrine/Tests/DBAL</directory>
</testsuite>
</testsuites>
<groups>
......
<?xml version="1.0" encoding="utf-8"?>
<phpunit>
<phpunit bootstrap="../Doctrine/Tests/TestInit.php">
<php>
<var name="db_type" value="mysqli"/>
<var name="db_host" value="localhost" />
......@@ -17,7 +17,7 @@
<testsuites>
<testsuite name="Doctrine DBAL Test Suite">
<directory>./../Doctrine/Tests/DBAL</directory>
<directory>../Doctrine/Tests/DBAL</directory>
</testsuite>
</testsuites>
<groups>
......
<?xml version="1.0" encoding="utf-8"?>
<phpunit>
<phpunit bootstrap="../Doctrine/Tests/TestInit.php">
<php>
<var name="db_type" value="pdo_pgsql"/>
<var name="db_host" value="localhost" />
......@@ -16,7 +16,7 @@
</php>
<testsuites>
<testsuite name="Doctrine DBAL Test Suite">
<directory>./../Doctrine/Tests/DBAL</directory>
<directory>../Doctrine/Tests/DBAL</directory>
</testsuite>
</testsuites>
<groups>
......
<?xml version="1.0" encoding="utf-8"?>
<phpunit>
<phpunit bootstrap="../Doctrine/Tests/TestInit.php">
<testsuites>
<testsuite name="Doctrine DBAL Test Suite">
<directory>./../Doctrine/Tests/DBAL</directory>
<directory>../Doctrine/Tests/DBAL</directory>
</testsuite>
</testsuites>
<groups>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment