Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix deprecations for phpunit 10, and maybe update to phpunit10 #6219

Open
tenzap opened this issue Jun 18, 2023 · 0 comments · May be fixed by #6220
Open

Fix deprecations for phpunit 10, and maybe update to phpunit10 #6219

tenzap opened this issue Jun 18, 2023 · 0 comments · May be fixed by #6220

Comments

@tenzap
Copy link
Contributor

tenzap commented Jun 18, 2023

when running the phpunit tests (with phpunit 9.6), these deprecation warnings are reported:

There were 11 warnings:

1) Loader_test::test_library
assertObjectHasAttribute() is deprecated and will be removed in PHPUnit 10. Refactor your test to use assertObjectHasProperty() (PHPUnit 10.1.0+) instead.

php-codeigniter-framework/tests/mocks/ci_testcase.php:353

2) Loader_test::test_library_extension
assertObjectHasAttribute() is deprecated and will be removed in PHPUnit 10. Refactor your test to use assertObjectHasProperty() (PHPUnit 10.1.0+) instead.

php-codeigniter-framework/tests/mocks/ci_testcase.php:353

3) Loader_test::test_library_config
assertObjectHasAttribute() is deprecated and will be removed in PHPUnit 10. Refactor your test to use assertObjectHasProperty() (PHPUnit 10.1.0+) instead.

php-codeigniter-framework/tests/mocks/ci_testcase.php:353

4) Loader_test::test_load_library_in_application_dir
assertObjectHasAttribute() is deprecated and will be removed in PHPUnit 10. Refactor your test to use assertObjectHasProperty() (PHPUnit 10.1.0+) instead.

php-codeigniter-framework/tests/mocks/ci_testcase.php:353

5) Loader_test::test_driver
assertObjectHasAttribute() is deprecated and will be removed in PHPUnit 10. Refactor your test to use assertObjectHasProperty() (PHPUnit 10.1.0+) instead.

php-codeigniter-framework/tests/mocks/ci_testcase.php:353

6) Loader_test::test_models
assertObjectHasAttribute() is deprecated and will be removed in PHPUnit 10. Refactor your test to use assertObjectHasProperty() (PHPUnit 10.1.0+) instead.

php-codeigniter-framework/tests/mocks/ci_testcase.php:353

7) Loader_test::test_model_subdir
assertObjectHasAttribute() is deprecated and will be removed in PHPUnit 10. Refactor your test to use assertObjectHasProperty() (PHPUnit 10.1.0+) instead.

php-codeigniter-framework/tests/mocks/ci_testcase.php:353

8) Loader_test::test_initialize
assertObjectHasAttribute() is deprecated and will be removed in PHPUnit 10. Refactor your test to use assertObjectHasProperty() (PHPUnit 10.1.0+) instead.

php-codeigniter-framework/tests/mocks/ci_testcase.php:353

9) Driver_test::test_load_driver
assertObjectHasAttribute() is deprecated and will be removed in PHPUnit 10. Refactor your test to use assertObjectHasProperty() (PHPUnit 10.1.0+) instead.

php-codeigniter-framework/tests/mocks/ci_testcase.php:353

10) Driver_test::test_load_app_driver
assertObjectHasAttribute() is deprecated and will be removed in PHPUnit 10. Refactor your test to use assertObjectHasProperty() (PHPUnit 10.1.0+) instead.

php-codeigniter-framework/tests/mocks/ci_testcase.php:353

11) Driver_test::test_load_driver_ext
assertObjectHasAttribute() is deprecated and will be removed in PHPUnit 10. Refactor your test to use assertObjectHasProperty() (PHPUnit 10.1.0+) instead.


When replacement suggested above is done, I face:

Fatal error: Cannot override final method PHPUnit\Framework\TestCase::runBare() in php-codeigniter-framework/tests/mocks/ci_testcase.php on line 351

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant