Travis CI - test fixes

1. Travis has to run PHP build-in server separately, 2. SoapFault message expectations are now Couldn't/Could not
This commit is contained in:
Petr Bechyně 2017-06-07 17:05:03 +02:00
parent c82288d641
commit 7bd8481a4e
3 changed files with 7 additions and 6 deletions

View File

@ -12,6 +12,7 @@ before_script:
- composer self-update
- composer install
- cp phpunit.xml.dist phpunit.xml
- php -S localhost:8000 > /dev/null 2>&1 &
script:
- vendor/phing/phing/bin/phing -f build.xml

View File

@ -75,7 +75,7 @@ class SoapClientTest extends PHPUnit_Framework_TestCase
public function testSoapCallWithCustomEndpointInvalidShouldFail()
{
$this->setExpectedException(Exception::class, 'Could not resolve host');
$this->setExpectedException(Exception::class, 't resolve host');
$soapClient = $this->getSoapBuilder()->build(
SoapClientOptionsBuilder::createWithEndpointLocation(self::TEST_REMOTE_ENDPOINT_NOT_WORKING),

View File

@ -36,7 +36,7 @@ class SoapServerAndSoapClientCommunicationSoapFaultsTest extends PHPUnit_Framewo
public function testSoapCallSwaWithLargeSwaResponseWithSoapFault()
{
$soapClient = $this->getSoapBuilder()->buildWithSoapHeader(
$soapClient = $this->getSoapClientBuilder()->buildWithSoapHeader(
SoapClientOptionsBuilder::createWithEndpointLocation(
self::TEST_HTTP_URL.'/SwaSenderSoapFaultEndpoint.php'
),
@ -91,7 +91,7 @@ class SoapServerAndSoapClientCommunicationSoapFaultsTest extends PHPUnit_Framewo
public function testSoapCallSwaWithLargeSwaResponseWithNoResponseFromEndpoint()
{
$soapClient = $this->getSoapBuilder()->buildWithSoapHeader(
$soapClient = $this->getSoapClientBuilder()->buildWithSoapHeader(
SoapClientOptionsBuilder::createWithEndpointLocation(
self::TEST_HTTP_URL.'/NoSuchEndpointExists'
),
@ -150,7 +150,7 @@ class SoapServerAndSoapClientCommunicationSoapFaultsTest extends PHPUnit_Framewo
public function testSoapCallSwaWithLargeSwaResponseWithNoResponseFromEndpointHost()
{
$soapClient = $this->getSoapBuilder()->buildWithSoapHeader(
$soapClient = $this->getSoapClientBuilder()->buildWithSoapHeader(
SoapClientOptionsBuilder::createWithEndpointLocation(
self::TEST_HTTP_URL_INVALID.'/NoSuchEndpointExists'
),
@ -181,7 +181,7 @@ class SoapServerAndSoapClientCommunicationSoapFaultsTest extends PHPUnit_Framewo
$e->faultcode
);
self::assertContains(
'Could not resolve host',
't resolve host',
$e->getMessage()
);
self::assertNull(
@ -204,7 +204,7 @@ class SoapServerAndSoapClientCommunicationSoapFaultsTest extends PHPUnit_Framewo
self::fail('Expected SoapFault was not thrown');
}
private function getSoapBuilder()
private function getSoapClientBuilder()
{
return new SoapClientBuilder();
}