-
Notifications
You must be signed in to change notification settings - Fork 4
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
Unit tests for User #10
base: 8.x-2.x
Are you sure you want to change the base?
Conversation
I've refactored to set and get response using functions, because |
* The tested Social Auth UserAuthenticator. | ||
* | ||
* @var \Drupal\social_auth\User\UserAuthenticator | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't forget about |\PHPUnit_Framework_MockObject_MockObject
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You have to repeat the process with all mocked objects. The point is that, for instance, my text editor highlights things as an error because you call the method expects
which is only defined in the \PHPUnit_Framework_MockObject_MockObject
class
* The tested Social Auth UserAuthenticator. | ||
* | ||
* @var \Drupal\social_auth\User\UserAuthenticator | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You have to repeat the process with all mocked objects. The point is that, for instance, my text editor highlights things as an error because you call the method expects
which is only defined in the \PHPUnit_Framework_MockObject_MockObject
class
I've created unit tests for UserAuthenticator.php and SocialAuthUser.php