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:
parent
c82288d641
commit
7bd8481a4e
@ -12,6 +12,7 @@ before_script:
|
|||||||
- composer self-update
|
- composer self-update
|
||||||
- composer install
|
- composer install
|
||||||
- cp phpunit.xml.dist phpunit.xml
|
- cp phpunit.xml.dist phpunit.xml
|
||||||
|
- php -S localhost:8000 > /dev/null 2>&1 &
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- vendor/phing/phing/bin/phing -f build.xml
|
- vendor/phing/phing/bin/phing -f build.xml
|
||||||
|
@ -75,7 +75,7 @@ class SoapClientTest extends PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
public function testSoapCallWithCustomEndpointInvalidShouldFail()
|
public function testSoapCallWithCustomEndpointInvalidShouldFail()
|
||||||
{
|
{
|
||||||
$this->setExpectedException(Exception::class, 'Could not resolve host');
|
$this->setExpectedException(Exception::class, 't resolve host');
|
||||||
|
|
||||||
$soapClient = $this->getSoapBuilder()->build(
|
$soapClient = $this->getSoapBuilder()->build(
|
||||||
SoapClientOptionsBuilder::createWithEndpointLocation(self::TEST_REMOTE_ENDPOINT_NOT_WORKING),
|
SoapClientOptionsBuilder::createWithEndpointLocation(self::TEST_REMOTE_ENDPOINT_NOT_WORKING),
|
||||||
|
@ -36,7 +36,7 @@ class SoapServerAndSoapClientCommunicationSoapFaultsTest extends PHPUnit_Framewo
|
|||||||
|
|
||||||
public function testSoapCallSwaWithLargeSwaResponseWithSoapFault()
|
public function testSoapCallSwaWithLargeSwaResponseWithSoapFault()
|
||||||
{
|
{
|
||||||
$soapClient = $this->getSoapBuilder()->buildWithSoapHeader(
|
$soapClient = $this->getSoapClientBuilder()->buildWithSoapHeader(
|
||||||
SoapClientOptionsBuilder::createWithEndpointLocation(
|
SoapClientOptionsBuilder::createWithEndpointLocation(
|
||||||
self::TEST_HTTP_URL.'/SwaSenderSoapFaultEndpoint.php'
|
self::TEST_HTTP_URL.'/SwaSenderSoapFaultEndpoint.php'
|
||||||
),
|
),
|
||||||
@ -91,7 +91,7 @@ class SoapServerAndSoapClientCommunicationSoapFaultsTest extends PHPUnit_Framewo
|
|||||||
|
|
||||||
public function testSoapCallSwaWithLargeSwaResponseWithNoResponseFromEndpoint()
|
public function testSoapCallSwaWithLargeSwaResponseWithNoResponseFromEndpoint()
|
||||||
{
|
{
|
||||||
$soapClient = $this->getSoapBuilder()->buildWithSoapHeader(
|
$soapClient = $this->getSoapClientBuilder()->buildWithSoapHeader(
|
||||||
SoapClientOptionsBuilder::createWithEndpointLocation(
|
SoapClientOptionsBuilder::createWithEndpointLocation(
|
||||||
self::TEST_HTTP_URL.'/NoSuchEndpointExists'
|
self::TEST_HTTP_URL.'/NoSuchEndpointExists'
|
||||||
),
|
),
|
||||||
@ -150,7 +150,7 @@ class SoapServerAndSoapClientCommunicationSoapFaultsTest extends PHPUnit_Framewo
|
|||||||
|
|
||||||
public function testSoapCallSwaWithLargeSwaResponseWithNoResponseFromEndpointHost()
|
public function testSoapCallSwaWithLargeSwaResponseWithNoResponseFromEndpointHost()
|
||||||
{
|
{
|
||||||
$soapClient = $this->getSoapBuilder()->buildWithSoapHeader(
|
$soapClient = $this->getSoapClientBuilder()->buildWithSoapHeader(
|
||||||
SoapClientOptionsBuilder::createWithEndpointLocation(
|
SoapClientOptionsBuilder::createWithEndpointLocation(
|
||||||
self::TEST_HTTP_URL_INVALID.'/NoSuchEndpointExists'
|
self::TEST_HTTP_URL_INVALID.'/NoSuchEndpointExists'
|
||||||
),
|
),
|
||||||
@ -181,7 +181,7 @@ class SoapServerAndSoapClientCommunicationSoapFaultsTest extends PHPUnit_Framewo
|
|||||||
$e->faultcode
|
$e->faultcode
|
||||||
);
|
);
|
||||||
self::assertContains(
|
self::assertContains(
|
||||||
'Could not resolve host',
|
't resolve host',
|
||||||
$e->getMessage()
|
$e->getMessage()
|
||||||
);
|
);
|
||||||
self::assertNull(
|
self::assertNull(
|
||||||
@ -204,7 +204,7 @@ class SoapServerAndSoapClientCommunicationSoapFaultsTest extends PHPUnit_Framewo
|
|||||||
self::fail('Expected SoapFault was not thrown');
|
self::fail('Expected SoapFault was not thrown');
|
||||||
}
|
}
|
||||||
|
|
||||||
private function getSoapBuilder()
|
private function getSoapClientBuilder()
|
||||||
{
|
{
|
||||||
return new SoapClientBuilder();
|
return new SoapClientBuilder();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user