Description: Update tests to work with PHPUnit 12
 Add Attributes because Annotations that were deprecated in phpunit 11
 were removed in phpunit 12
Origin: self
Author: Fab Stz <fabstz-it@yahoo.fr>
Last-Update: 2025-08-26

--- a/tests/codeigniter/core/Lang_test.php
+++ b/tests/codeigniter/core/Lang_test.php
@@ -90,6 +90,7 @@
 	/**
 	 * @depends	test_load
 	 */
+	#[PHPUnit\Framework\Attributes\Depends('test_load')]
 	public function test_line()
 	{
 		$this->ci_vfs_clone('system/language/english/profiler_lang.php');
--- a/tests/codeigniter/core/Security_test.php
+++ b/tests/codeigniter/core/Security_test.php
@@ -235,6 +235,8 @@
 	 * @depends test_xss_clean_sanitize_naughty_html_tags
 	 * @depends test_xss_clean_sanitize_naughty_html_attributes
 	 */
+	#[PHPUnit\Framework\Attributes\Depends('test_xss_clean_sanitize_naughty_html_tags')]
+	#[PHPUnit\Framework\Attributes\Depends('test_xss_clean_sanitize_naughty_html_attributes')]
 	public function test_naughty_html_plus_evil_attributes()
 	{
 		$this->assertEquals(
--- a/tests/codeigniter/core/Utf8_test.php
+++ b/tests/codeigniter/core/Utf8_test.php
@@ -49,6 +49,7 @@
 	 * @depends	test_is_ascii
 	 * @covers	CI_Utf8::clean_string
 	 */
+	#[PHPUnit\Framework\Attributes\Depends('test_is_ascii')]
 	public function test_clean_string()
 	{
 		$this->assertEquals('foo bar', $this->utf8->clean_string('foo bar'));
--- a/tests/codeigniter/core/compat/hash_test.php
+++ b/tests/codeigniter/core/compat/hash_test.php
@@ -22,6 +22,7 @@
 	 *
 	 * @depends	test_bootstrap
 	 */
+	#[PHPUnit\Framework\Attributes\Depends('test_bootstrap')]
 	public function test_hash_equals()
 	{
 		$this->assertTrue(hash_equals('same', 'same'));
@@ -42,6 +43,7 @@
 	 *
 	 * @depends	test_bootstrap
 	 */
+	#[PHPUnit\Framework\Attributes\Depends('test_bootstrap')]
 	public function test_hash_pbkdf2()
 	{
 		if (is_php('5.5'))
@@ -74,4 +76,4 @@
 		);
 	}
 
-}
\ No newline at end of file
+}
--- a/tests/codeigniter/core/compat/mbstring_test.php
+++ b/tests/codeigniter/core/compat/mbstring_test.php
@@ -18,6 +18,7 @@
 	/**
 	 * @depends	test_bootstrap
 	 */
+	#[PHPUnit\Framework\Attributes\Depends('test_bootstrap')]
 	public function test_mb_strlen()
 	{
 		$this->assertEquals(ICONV_ENABLED ? 4 : 8, mb_strlen('тест'));
@@ -29,6 +30,7 @@
 	/**
 	 * @depends	test_bootstrap
 	 */
+	#[PHPUnit\Framework\Attributes\Depends('test_bootstrap')]
 	public function test_mb_strpos()
 	{
 		$this->assertEquals(ICONV_ENABLED ? 2 : 4, mb_strpos('тест', 'с'));
@@ -41,6 +43,7 @@
 	/**
 	 * @depends	test_bootstrap
 	 */
+	#[PHPUnit\Framework\Attributes\Depends('test_bootstrap')]
 	public function test_mb_substr()
 	{
 		$this->assertEquals(ICONV_ENABLED ? 'стинг' : 'естинг', mb_substr('тестинг', 2));
--- a/tests/codeigniter/core/compat/password_test.php
+++ b/tests/codeigniter/core/compat/password_test.php
@@ -39,6 +39,7 @@
 	 *
 	 * @depends	test_bootstrap
 	 */
+	#[PHPUnit\Framework\Attributes\Depends('test_bootstrap')]
 	public function test_password_get_info()
 	{
 		$expected = array(
@@ -77,6 +78,7 @@
 	 *
 	 * @depends	test_bootstrap
 	 */
+	#[PHPUnit\Framework\Attributes\Depends('test_bootstrap')]
 	public function test_password_hash()
 	{
 		// FALSE is returned if no CSPRNG source is available
@@ -112,6 +114,7 @@
 	 *
 	 * @depends	test_password_get_info
 	 */
+	#[PHPUnit\Framework\Attributes\Depends('test_password_get_info')]
 	public function test_password_needs_rehash()
 	{
 		// invalid hash: always rehash
@@ -148,6 +151,7 @@
 	 *
 	 * @depends	test_bootstrap
 	 */
+	#[PHPUnit\Framework\Attributes\Depends('test_bootstrap')]
 	public function test_password_verify()
 	{
 		$this->assertFalse(password_verify(123, 123));
--- a/tests/codeigniter/core/compat/standard_test.php
+++ b/tests/codeigniter/core/compat/standard_test.php
@@ -26,6 +26,7 @@
 	 *
 	 * @depends	test_bootstrap
 	 */
+	#[PHPUnit\Framework\Attributes\Depends('test_bootstrap')]
 	public function test_array_column()
 	{
 		// Basic tests
--- a/tests/codeigniter/database/query_builder/like_test.php
+++ b/tests/codeigniter/database/query_builder/like_test.php
@@ -110,6 +110,7 @@
 	 *
 	 * @dataProvider like_set_side_provider
 	 */
+	#[PHPUnit\Framework\Attributes\DataProvider('like_set_side_provider')]
 	public function test_like_set_side($str, $side, $expected_name)
 	{
 		$actual = $this->db->like('name', $str, $side)->get('job')->result_array();
--- a/tests/codeigniter/libraries/Encryption_test.php
+++ b/tests/codeigniter/libraries/Encryption_test.php
@@ -194,6 +194,8 @@
 	 * @depends	test_hkdf
 	 * @depends	test__get_params
 	 */
+	#[PHPUnit\Framework\Attributes\Depends('test_hkdf')]
+	#[PHPUnit\Framework\Attributes\Depends('test__get_params')]
 	public function test_initialize_encrypt_decrypt()
 	{
 		$message = 'This is a plain-text message.';
@@ -223,6 +225,7 @@
 	 *
 	 * @depends	test__get_params
 	 */
+	#[PHPUnit\Framework\Attributes\Depends('test__get_params')]
 	public function test_encrypt_decrypt_custom()
 	{
 		$message = 'Another plain-text message.';
--- a/tests/codeigniter/libraries/Table_test.php
+++ b/tests/codeigniter/libraries/Table_test.php
@@ -33,9 +33,10 @@
 		$this->assertEquals('awesome cap', $this->table->caption);
 	}
 
-	/*
+	/**
 	 * @depends	test_prep_args
 	 */
+	#[PHPUnit\Framework\Attributes\Depends('test_prep_args')]
 	public function test_set_heading()
 	{
 		// uses _prep_args internally, so we'll just do a quick
@@ -54,9 +55,10 @@
 		);
 	}
 
-	/*
+	/**
 	 * @depends	test_prep_args
 	 */
+	#[PHPUnit\Framework\Attributes\Depends('test_prep_args')]
 	public function test_add_row()
 	{
 		// uses _prep_args internally, so we'll just do a quick
--- a/tests/codeigniter/libraries/Encrypt_test.php
+++ b/tests/codeigniter/libraries/Encrypt_test.php
@@ -2,6 +2,7 @@
 /**
  * @requires extension mcrypt
  */
+#[PHPUnit\Framework\Attributes\RequiresPhpExtension('mcrypt')]
 class Encrypt_test extends CI_TestCase {
 
 	public function set_up()
