#!/usr/bin/env php
PHPUnit 5.4.6 by Sebastian Bergmann and contributors.
Fatal error: Class ‘GuzzleHttp\Tests\Psr7\HasToString’ not found in
C:\Temp\phpunit1\vendor\guzzlehttp\psr7\tests\FunctionsTest.php on line 389
This error appears when I run my test plan.
If I run ‘phpunit tests’ from the command line from the same working folder set in my test plan, it works as expected.
If I remove the guzzle component, the test plan works as expected.
Try adding C:\Temp\phpunit1\vendor\ to Preferences > Languages > PHP > PHP Directories.
Note that the current unit testing feature will be completely replaced in Komodo IDE 10.2, which you can preview today (it’s an alpha pre-release): Komodo 10.2 Pre-Release Now Available
What formatter is used for PHPUnit output? I thought that by default it should be TAP so Komodo shouldn’t pass --teamcity option to the phpunit command.
Where is GuzzleHttp\Tests\Psr7\HasToString located?
It doesn’t exist.
Which then gave me the idea, why are tests other than mine running to begin with?
I removed vendor/guzzlehttp/psr7/tests and it now runs fine in 10.1.4. I’m guessing the current version is very aggressive in find tests to run, while the alpha is not.
Yeah one of the primary reasons we dumped the old unit testing implementation is because it didn’t run tests the same way YOU would when you run them from the command line.
Unit testing in 10.2 will run your tests exactly as you would when using them from the command line, which solves a lot of problems.