1
0
mirror of synced 2024-12-14 15:16:04 +03:00
doctrine2/tests/Doctrine/Tests/DbalFunctionalTestCase.php

43 lines
911 B
PHP
Raw Normal View History

<?php
namespace Doctrine\Tests;
class DbalFunctionalTestCase extends DbalTestCase
{
2012-12-14 22:55:49 +04:00
/**
* Shared connection when a TestCase is run alone (outside of its functional suite).
*
* @var \Doctrine\DBAL\Connection|null
*/
private static $_sharedConn;
/**
2012-12-14 22:55:49 +04:00
* @var \Doctrine\DBAL\Connection
*/
protected $_conn;
2012-12-14 22:55:49 +04:00
/**
* @return void
*/
protected function resetSharedConn()
{
$this->sharedFixture['conn'] = null;
self::$_sharedConn = null;
}
2012-12-14 22:55:49 +04:00
/**
* @return void
*/
protected function setUp()
{
if (isset($this->sharedFixture['conn'])) {
$this->_conn = $this->sharedFixture['conn'];
} else {
if ( ! isset(self::$_sharedConn)) {
self::$_sharedConn = TestUtil::getConnection();
}
$this->_conn = self::$_sharedConn;
}
}
2012-12-14 22:55:49 +04:00
}