From cff97bf55356e8f522616515e69e1b4ec02c4cf4 Mon Sep 17 00:00:00 2001 From: Kristian Zondervan Date: Mon, 28 Apr 2014 07:38:18 +0000 Subject: [PATCH] Add live test for async call --- .../Test/MeasurementProtocolClientTest.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/tests/Krizon/Google/Analytics/MeasurementProtocol/Test/MeasurementProtocolClientTest.php b/tests/Krizon/Google/Analytics/MeasurementProtocol/Test/MeasurementProtocolClientTest.php index 21cf3fa..8cf69ba 100644 --- a/tests/Krizon/Google/Analytics/MeasurementProtocol/Test/MeasurementProtocolClientTest.php +++ b/tests/Krizon/Google/Analytics/MeasurementProtocol/Test/MeasurementProtocolClientTest.php @@ -236,6 +236,25 @@ public function testTrackingIdAsParamWins() $this->assertEquals('X3', $this->history->getLastRequest()->getQuery()->get('tid')); } + /** + * @group internet + */ + public function testAsyncRequestLive() + { + $client = MeasurementProtocolClient::factory(array( + 'async' => true + )); + $response = $this->getResponse('pageview', array( + 'tid' => $this->getTrackingId(), + 'cid' => $this->getCustomerId(), + 't' => 'pageview', + 'dh' => 'domain.do', + 'dp' => '/php-ga-measurement-protocol/phpunit-test/async', + 'dt' => 'PHP GA Measurement Protocol Async' + ), false, $client); + $this->assertEquals(200, $response->getStatusCode()); + } + /** * @param $operation * @param array $parameters