1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-27 04:45:20 +01:00

Check for Soap before running method call test

Fixes #1554
This commit is contained in:
Matthew Brown 2019-04-13 13:53:08 -04:00
parent f3b605e442
commit d377bbde2b

View File

@ -6,6 +6,26 @@ class MethodCallTest extends TestCase
use Traits\InvalidCodeAnalysisTestTrait;
use Traits\ValidCodeAnalysisTestTrait;
/**
* @return void
*/
public function testExtendDocblockParamType()
{
if (class_exists('SoapClient') === false) {
$this->markTestSkipped('Cannot run test, base class "SoapClient" does not exist!');
return;
}
$this->addFile(
'somefile.php',
'<?php
new SoapFault("1", "faultstring", "faultactor");'
);
$this->analyzeFile('somefile.php', new \Psalm\Context());
}
/**
* @return iterable<string,array{string,assertions?:array<string,string>,error_levels?:string[]}>
*/
@ -318,10 +338,6 @@ class MethodCallTest extends TestCase
);
}'
],
'soapFaultConstruct' => [
'<?php
new SoapFault("1", "faultstring", "faultactor");'
],
];
}