Skip to content

Commit

Permalink
Add general user-agent headerline for guzzle integration testing
Browse files Browse the repository at this point in the history
  • Loading branch information
veewee committed Jan 8, 2017
1 parent a99681d commit 689e52e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Expand Up @@ -21,6 +21,7 @@ before_install:
install:
- if [ "$DEPENDENCIES" != "low" ]; then travis_retry composer update --no-progress --profile --prefer-dist --no-scripts --no-interaction; fi;
- if [ "$DEPENDENCIES" == "low" ]; then travis_retry composer update --no-progress --profile --prefer-lowest --no-scripts --no-interaction; fi;
- composer show

script:
- ./vendor/bin/grumphp run
Expand Up @@ -36,8 +36,9 @@ class GuzzleSoapClientTest extends \PHPUnit_Framework_TestCase
*/
function setUp()
{
$guzzleClient = new Client(['headers' => ['User-Agent' => 'testing/1.0']]);
$this->client = new PhproSoapClient(self::CDYNE_WSDL, ['soap_version' => SOAP_1_2]);
$this->client->setHandler(GuzzleHandle::createForClient($guzzleClient = new Client()));
$this->client->setHandler(GuzzleHandle::createForClient($guzzleClient));
$this->handlerStack = $guzzleClient->getConfig('handler');
}

Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/vcr/guzzle-get-city-weather-by-zip-10013.yml
Expand Up @@ -7,7 +7,7 @@
Host: wsf.cdyne.com
Expect: null
Accept-Encoding: null
User-Agent: 'GuzzleHttp/6.2.1 curl/7.37.1 PHP/7.1.0'
User-Agent: 'testing/1.0'
Content-Type: 'application/soap+xml; charset="utf-8"; action="http://ws.cdyne.com/WeatherWS/GetCityWeatherByZIP"'
Accept: null
body: "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<env:Envelope xmlns:env=\"http://www.w3.org/2003/05/soap-envelope\" xmlns:ns1=\"http://ws.cdyne.com/WeatherWS/\"><env:Body><ns1:GetCityWeatherByZIP><ns1:ZIP>10013</ns1:ZIP></ns1:GetCityWeatherByZIP></env:Body></env:Envelope>\n"
Expand Down

0 comments on commit 689e52e

Please sign in to comment.