diff options
Diffstat (limited to 'tests/test_framework/phpbb_test_case.php')
| -rw-r--r-- | tests/test_framework/phpbb_test_case.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/test_framework/phpbb_test_case.php b/tests/test_framework/phpbb_test_case.php index 8b16f02638..48c2f48887 100644 --- a/tests/test_framework/phpbb_test_case.php +++ b/tests/test_framework/phpbb_test_case.php @@ -11,9 +11,20 @@ class phpbb_test_case extends PHPUnit_Framework_TestCase { protected $test_case_helpers; + protected $phpbb_container; + public function __construct($name = NULL, array $data = array(), $dataName = '') { parent::__construct($name, $data, $dataName); + + global $phpbb_container, $phpbb_root_path; + + // Setup the container for global usage + $this->phpbb_container = $phpbb_container = new phpbb_mock_container_builder(); + + // Set some commonly needed systems up + $phpbb_container->set('filesystem', new phpbb_filesystem($phpbb_root_path)); + $this->backupStaticAttributesBlacklist += array( 'PHP_CodeCoverage' => array('instance'), 'PHP_CodeCoverage_Filter' => array('instance'), |
