Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
1 vote
2 answers
195 views

PHP unit test to confirm that a validator is being called correctly

I have a Responder class whose prepare method takes an entity, checks it with a validator, and returns a response or errorResponse based on the results of validator....
EresDev's user avatar
  • 121
3 votes
2 answers
166 views

PHPUnit test for a PaymentMethodRuleManager

The following code snippet is about adding rules that filters Payment Methods listing to customer, for email we provide 4 different types of payment methods, but we do show them depending on some ...
Dahab's user avatar
  • 159
4 votes
1 answer
140 views

Testing a Pivotal API request client using lots of mocking

I have a class that is all about doing HTTP requests, and logging (in file system & database). It's only using 3 dependencies to do these things, so I'm fine with the code so far. Here it is for ...
Steve Chamaillard's user avatar
5 votes
1 answer
471 views

Mock user table class

I've just created my first tests using mock classes. So far my tests are running much faster and now I guess I'm solely focusing on a single class (in this case I'm testing UserTable and mocking the ...
Martyn's user avatar
  • 233