DbalFunctionalTestCase.php 727 Bytes
Newer Older
1 2 3 4 5 6
<?php

namespace Doctrine\Tests;

class DbalFunctionalTestCase extends DbalTestCase
{
7 8 9
    /**
     * Shared connection when a TestCase is run alone (outside of it's functional suite)
     *
10
     * @var \Doctrine\DBAL\Connection
11
     */
12
    private static $_sharedConn;
13 14

    /**
15
     * @var \Doctrine\DBAL\Connection
16
     */
17 18
    protected $_conn;

19 20
    protected function resetSharedConn()
    {
21 22 23 24
        if (self::$_sharedConn) {
            self::$_sharedConn->close();
            self::$_sharedConn = null;
        }
25 26
    }

27 28
    protected function setUp()
    {
29 30
        if ( ! isset(self::$_sharedConn)) {
            self::$_sharedConn = TestUtil::getConnection();
31
        }
32
        $this->_conn = self::$_sharedConn;
33
    }
34
}