I'm writing integration tests for a SOAP API (code example s. below).
Now I got an error and want to debug my server-side code (in PhpStorm). But the debugger considers only the breakpoints in the test and ignores the server-side code.
OK, I probably roughly understand why: The call of the $soapClient->doSomething(...);
starts a new HTTP request. How to get this "sub-request" (from the point of view of PhpUnit) debugged?
Integration test's code:
class UserIntegrationTest extends TestCaseBase
{
const URL = "http://my-server.loc/soapapi/user/wsdl";
public static $classMap = [];
/** @var SoapClient */
private $soapClient;
/** @var ConfigurationServiceInterface */
private $config;
public function setUp()
{
parent::setUp();
$options = [
'exceptions' => true,
'login' => 'foo',
'password' => 'pwd',
'encoding' => 'utf-8',
// 'proxy_host' => '192.168.2.96',
// 'proxy_port' => '8080',
'classmap' => [],
'connection_timeout' => 5,
];
$this->soapClient = new SoapClient(self::URL, $options);
}
/**
* @test
* @group integration
*/
public function testDoSomething()
{
$options = array(
'exceptions' => true,
'login' => 'foo',
'password' => 'pwd',
'encoding' => 'utf-8',
// 'proxy_host' => '192.168.2.96',
// 'proxy_port' => '8080',
'classmap' => [],
'connection_timeout' => 5,
);
$soapClient = new SoapClient(self::URL, $options);
$message = new MyMessage();
$message->x = 1;
$message->y = 2;
$result = $soapClient->doSomething($message);
}
protected function getDataSet()
{
return new ArrayDataSet([
'users' => [
[
'id' => 1,
'username' => 'foo',
'password' => '...',
],
],
...
]);
}
}