Skip to content

Commit

Permalink
Merge commit 'opensky/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
Guilherme Blanco committed Apr 15, 2010
2 parents 26ff265 + c122953 commit 9f15acd
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions tests/Doctrine/Tests/OrmFunctionalTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ abstract class OrmFunctionalTestCase extends OrmTestCase
private static $_queryCacheImpl = null;

/* Shared connection when a TestCase is run alone (outside of it's functional suite) */
private static $_sharedConn;
protected static $_sharedConn;

/**
* @var \Doctrine\ORM\EntityManager
Expand All @@ -33,13 +33,13 @@ abstract class OrmFunctionalTestCase extends OrmTestCase
protected $_sqlLoggerStack;

/** The names of the model sets used in this testcase. */
private $_usedModelSets = array();
protected $_usedModelSets = array();

/** Whether the database schema has already been created. */
private static $_tablesCreated = array();
protected static $_tablesCreated = array();

/** List of model sets and their classes. */
private static $_modelSets = array(
protected static $_modelSets = array(
'cms' => array(
'Doctrine\Tests\Models\CMS\CmsUser',
'Doctrine\Tests\Models\CMS\CmsPhonenumber',
Expand Down Expand Up @@ -170,11 +170,11 @@ protected function setUp()
$forceCreateTables = false;

if ( ! isset($this->sharedFixture['conn'])) {
if ( ! isset(self::$_sharedConn)) {
self::$_sharedConn = TestUtil::getConnection();
if ( ! isset(static::$_sharedConn)) {
static::$_sharedConn = TestUtil::getConnection();
}

$this->sharedFixture['conn'] = self::$_sharedConn;
$this->sharedFixture['conn'] = static::$_sharedConn;

if ($this->sharedFixture['conn']->getDriver() instanceof \Doctrine\DBAL\Driver\PDOSqlite\Driver) {
$forceCreateTables = true;
Expand All @@ -189,12 +189,12 @@ protected function setUp()
$classes = array();

foreach ($this->_usedModelSets as $setName => $bool) {
if ( ! isset(self::$_tablesCreated[$setName])/* || $forceCreateTables*/) {
foreach (self::$_modelSets[$setName] as $className) {
if ( ! isset(static::$_tablesCreated[$setName])/* || $forceCreateTables*/) {
foreach (static::$_modelSets[$setName] as $className) {
$classes[] = $this->_em->getClassMetadata($className);
}

self::$_tablesCreated[$setName] = true;
static::$_tablesCreated[$setName] = true;
}
}

Expand Down

0 comments on commit 9f15acd

Please sign in to comment.