DbalFunctionalTestCase.php 727B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. namespace Doctrine\Tests;
  3. class DbalFunctionalTestCase extends DbalTestCase
  4. {
  5. /**
  6. * Shared connection when a TestCase is run alone (outside of it's functional suite)
  7. *
  8. * @var \Doctrine\DBAL\Connection
  9. */
  10. private static $_sharedConn;
  11. /**
  12. * @var \Doctrine\DBAL\Connection
  13. */
  14. protected $_conn;
  15. protected function resetSharedConn()
  16. {
  17. if (self::$_sharedConn) {
  18. self::$_sharedConn->close();
  19. self::$_sharedConn = null;
  20. }
  21. }
  22. protected function setUp()
  23. {
  24. if ( ! isset(self::$_sharedConn)) {
  25. self::$_sharedConn = TestUtil::getConnection();
  26. }
  27. $this->_conn = self::$_sharedConn;
  28. }
  29. }