From 43621f2fc14d83d81e403b0da45b3f34ef0586de Mon Sep 17 00:00:00 2001 From: tenzap Date: Mon, 19 Jun 2023 20:20:35 +0200 Subject: [PATCH] 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 --- tests/mocks/ci_testcase.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/mocks/ci_testcase.php b/tests/mocks/ci_testcase.php index 3ebb6b822e9..92c435b1e85 100644 --- a/tests/mocks/ci_testcase.php +++ b/tests/mocks/ci_testcase.php @@ -35,6 +35,7 @@ public function __construct($name = null, array $data = array(), $dataName = '') public function setUp() { + self::$ci_test_instance = $this; // Setup VFS with base directories $this->ci_vfs_root = vfsStream::setup(''); $this->ci_app_root = vfsStream::newDirectory('application')->at($this->ci_vfs_root); @@ -347,11 +348,11 @@ public function ci_vfs_path($path, $base = '') * happen in setUp, but someone is bound to forget to * call the parent method and debugging this is no fun. */ - public function runBare() + /*public function runBare() { self::$ci_test_instance = $this; parent::runBare(); - } + }*/ // --------------------------------------------------------------------