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

HookTest - Fix execution on PHP 8 #266

Merged
merged 1 commit into from
Dec 21, 2021

Conversation

totten
Copy link
Member

@totten totten commented Dec 21, 2021

@seamuslee001 This should address the failure demonstrated by #265.

Before

Test fails on PHP 8

CiviWP\HookTest::testFoo
Undefined array key "hook_was_called"

/home/jenkins/bknix-dfl/build/wp-265-47vsb/web/wp-content/plugins/civicrm/tests/phpunit/CiviWP/HookTest.php:22

After

Test passes

Comments

This is a superficial change - the assertion in question is supposed to validate the starting circumstance (asserting that the hook has not yet run). This is just a cleaner assertion that the hook has not yet run.

Before
------

Test fails on PHP 8

```
CiviWP\HookTest::testFoo
Undefined array key "hook_was_called"

/home/jenkins/bknix-dfl/build/wp-265-47vsb/web/wp-content/plugins/civicrm/tests/phpunit/CiviWP/HookTest.php:22
```

After
-----

Test passes

Comments
--------

This is a superficial change - the point of the assertion is to validate the
starting circumstance (asserting that the hook has not yet run). This is just
a cleaner assertion that the hook has not yet run.
@seamuslee001
Copy link
Contributor

looks fine to me

@seamuslee001 seamuslee001 merged commit d1189a5 into civicrm:master Dec 21, 2021
@totten totten deleted the master-hooktest branch December 21, 2021 05:05
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 this pull request may close these issues.

2 participants