1: <?php
2:
3: namespace tests\unit;
4:
5: use PHPUnit_Framework_TestCase;
6: use Database;
7:
8: abstract class BaseUnitTestCase extends PHPUnit_Framework_TestCase
9: {
10:
11: public static function setUpBeforeClass()
12: {
13: // this is bad, don't do this
14: // if(file_exists(__DIR__."/../../../../barebones/config/config.php")){
15: require_once(__DIR__."/../../barebones/config/config.php");
16: // }
17: }
18:
19: public function setUp(){
20: Database::beginTransaction();
21: }
22:
23: public function tearDown(){
24: Database::rollback();
25: }
26: }
27: