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

Failing unit test mod_turnitintooltwo_view_testcase::test_output_header, after MDL-78806 #694

Open
keevan opened this issue Sep 19, 2023 · 0 comments

Comments

@keevan
Copy link

keevan commented Sep 19, 2023

https://tracker.moodle.org/browse/MDL-78806

Appears after this change, this test is failing: mod_turnitintooltwo_view_testcase::test_output_header

Moodle 4.1.5+ (Build: 20230915)
Php: 8.1.2.1.2.14, pgsql: 14.9 (Debian 14.9-1.pgdg120+1), OS: Linux 6.2.0-1009-aws x86_64
PHPUnit 9.5.28 by Sebastian Bergmann and contributors.

...

1) mod_turnitintooltwo_view_testcase::test_output_header
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'Fake Title'
+'Fake Title | phpunit'

/var/www/site/mod/turnitintooltwo/tests/unit/classes/view/turnitintooltwo_view_test.php:56
/var/www/site/lib/phpunit/classes/advanced_testcase.php:80

The suggestion would be to check if the string contains the expected string, instead of doing an exact match.

$this->assertEquals($pagetitle, $PAGE->title);

keevan added a commit to catalyst/moodle-mod_turnitintooltwo that referenced this issue Sep 19, 2023
keevan added a commit to catalyst/moodle-mod_turnitintooltwo that referenced this issue Sep 19, 2023
keevan added a commit to catalyst/moodle-mod_turnitintooltwo that referenced this issue Sep 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

1 participant