Skip to content

Commit 43621f2

Browse files
committed
fix error with phpunit10 (cannot override runBare())
Fatal error: Cannot override final method PHPUnit\Framework\TestCase::runBare() in tests/mocks/ci_testcase.php on line 351
1 parent d393649 commit 43621f2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/mocks/ci_testcase.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ public function __construct($name = null, array $data = array(), $dataName = '')
3535

3636
public function setUp()
3737
{
38+
self::$ci_test_instance = $this;
3839
// Setup VFS with base directories
3940
$this->ci_vfs_root = vfsStream::setup('');
4041
$this->ci_app_root = vfsStream::newDirectory('application')->at($this->ci_vfs_root);
@@ -347,11 +348,11 @@ public function ci_vfs_path($path, $base = '')
347348
* happen in setUp, but someone is bound to forget to
348349
* call the parent method and debugging this is no fun.
349350
*/
350-
public function runBare()
351+
/*public function runBare()
351352
{
352353
self::$ci_test_instance = $this;
353354
parent::runBare();
354-
}
355+
}*/
355356

356357
// --------------------------------------------------------------------
357358

0 commit comments

Comments
 (0)