PHPUnit is the de facto standard for writing unit tests for PHP code.
1
vote
1answer
65 views
Car store implementation using abstract factory
I'm studying design patterns and I made this car store implementation. Although I'm confident that the idea is right, I'm not confident that the implementation is good. I would like you to check it ...
4
votes
1answer
68 views
Simple Pizza Factory with tests
I implemented the Simple Factory Pattern with some unit tests, but I'm with a feeling that I did something wrong and that I can improve it.
Tell me what you think about the code (source and tests).
...
0
votes
0answers
42 views
PHP Dependency Injection - magic methods injections?
I'm trying to get my head around DI. Am I doing it correctly for classes that follow DI pattern?
...
3
votes
0answers
136 views
Laravel Testing: Is this testing too much of the inner workings?
So I'm using laravel for a project and have a InvoiceRepository and a InvoiceRepositoryTest and I have written the test first ...
1
vote
1answer
498 views
Unit Testing of Curl based Rest Client Library
https://github.com/andrewjwolf/payjunction-php
I ran into some issues with unit testing in that getting the response body etc from the curl handle was tricky. I didn't want to necessarily use a mock ...
3
votes
1answer
144 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 ...