Skip to content

Commit

Permalink
Unit test for self:: to static:: Http\Client update
Browse files Browse the repository at this point in the history
  • Loading branch information
tklever authored and dima committed Nov 27, 2014
1 parent 5589519 commit 3e2ef16
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/ZendTest/Http/ClientTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
use Zend\Http\Request;
use Zend\Http\Response;
use Zend\Http\Client\Adapter\Test;
use ZendTest\Http\TestAsset\ExtendedClient;


class ClientTest extends \PHPUnit_Framework_TestCase
Expand Down Expand Up @@ -376,6 +377,7 @@ public function testPrepareHeadersCreateRightHttpField()
}

/**
<<<<<<< Upstream, based on zf2/master
* @group 6231
*/
public function testHttpQueryParametersCastToString()
Expand Down Expand Up @@ -405,5 +407,15 @@ public function testHttpQueryParametersCastToString()
->will($this->returnValue($response->toString()));

$client->send($request);
=======
* Test for pull request 6301
* Previous functionality would have thrown an exception
* This test serves to verify that exception is not thrown
*/
public function testCanSpecifyCustomAuthMethodsInExtendingClasses()
{
$client = new ExtendedClient();
$client->setAuth('username', 'password', ExtendedClient::AUTH_CUSTOM);
>>>>>>> d0d9ac2 Unit test for self:: to static:: Http\Client update
}
}
10 changes: 10 additions & 0 deletions tests/ZendTest/Http/TestAsset/ExtendedClient.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

namespace ZendTest\Http\TestAsset;

use Zend\Http\Client;

class ExtendedClient extends Client
{
const AUTH_CUSTOM = 'custom';
}

0 comments on commit 3e2ef16

Please sign in to comment.