File: 21-phpunit12-part2-remove-__construct.patch

package info (click to toggle)
php-codeigniter-framework 3.1.13%2Bdfsg1-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,228 kB
  • sloc: php: 37,178; xml: 205; makefile: 138; python: 66; sh: 65
file content (29 lines) | stat: -rw-r--r-- 1,128 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
Description: Update tests to work with PHPUnit 12
 PHP Fatal error:  Cannot override final method PHPUnit\Framework\TestCase::__construct() in /src/tests/mocks/ci_testcase.php on line 29
 .
 Fatal error: Cannot override final method PHPUnit\Framework\TestCase::__construct() in /src/tests/mocks/ci_testcase.php on line 29
Bug: https://github.com/bcit-ci/CodeIgniter/issues/6319
Origin: self
Author: Fab Stz <fabstz-it@yahoo.fr>
Last-Update: 2025-08-26

--- a/tests/mocks/ci_testcase.php
+++ b/tests/mocks/ci_testcase.php
@@ -26,16 +26,9 @@ class CI_TestCase extends \PHPUnit\Framework\TestCase {
 
 	// --------------------------------------------------------------------
 
-	public function __construct($name = null, array $data = array(), $dataName = '')
-	{
-		parent::__construct($name, $data, $dataName);
-		$this->ci_instance = new stdClass();
-	}
-
-	// --------------------------------------------------------------------
-
 	public function setUp(): void
 	{
+		$this->ci_instance = new stdClass();
 		self::$ci_test_instance = $this;
 		// Setup VFS with base directories
 		$this->ci_vfs_root = vfsStream::setup('');