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

waitFor return check since waitForText doesn't assert #146

Open
wants to merge 1 commit into
base: 8.3.x
Choose a base branch
from

Conversation

smmccabe
Copy link

@smmccabe smmccabe commented Dec 2, 2021

Improved version of #145 which was initially only internal. The one has test and matches code standards

@smmccabe smmccabe mentioned this pull request Dec 2, 2021
*/
public function registerFunctionNames()
{
return ['waitForText'];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add more of the waitFor* methods?

@alexpott
Copy link
Contributor

alexpott commented Dec 3, 2021

Nice one @smmccabe - this is looking pretty good and very useful. One small question about whether to include the other waitFor* methods.

Copy link
Collaborator

@klausi klausi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, makes sense in general to me. Can we add some safe guards that we do not trigger on the function call waitForText() and that we are in a test class?

I feel like this check would be a better fit for drupalcheck, which can do real semantic analysis with phpstan https://github.com/mglaman/drupal-check

@@ -0,0 +1,57 @@
<?php
/**
* Unit test class for the DbQuery sniff.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

copy paste leftover?

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.

3 participants