Using phpunit and I am having some trouble with include paths, not for phpunit itself, but for my code and tests directory.
I have the following code structure:
First, I don't get how require_once('../StringCalculator.php');
works, it should rather be: require_once('../Application/StringCalculator.php');
.
Then, slashingweapon answer is good and it's the best IMO, however if you don't want that much trouble, you can specify your require_once
to start from the directory of the current file:
require_once(__DIR__ . '../Application/StringCalculator.php');