Skip to content
This repository was archived by the owner on Jan 29, 2020. It is now read-only.

Commit becce4a

Browse files
committed
Adapter\HttpTest challengeClient() usage
1 parent 4dc3ed1 commit becce4a

File tree

1 file changed

+5
-14
lines changed

1 file changed

+5
-14
lines changed

test/Adapter/HttpTest.php

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
namespace ZendTest\Authentication\Adapter;
1212

1313
use Zend\Authentication\Adapter;
14+
use Zend\Http\Response;
1415

1516
class HttpTest extends \PHPUnit_Framework_TestCase
1617
{
@@ -26,27 +27,17 @@ public function setUp()
2627
'realm' => 'testing',
2728
];
2829

29-
$this->_wrapper = new Wrapper($config);
30+
$this->_wrapper = new Adapter\Http($config);
3031
}
3132

3233
public function tearDown()
3334
{
3435
unset($this->_wrapper);
3536
}
3637

37-
/**
38-
* @expectedException PHPUnit_Framework_Error_Deprecated
39-
*/
40-
public function testProtectedMethodChallengeClientTriggersErrorDeprecated()
41-
{
42-
$this->_wrapper->_challengeClient();
43-
}
44-
}
45-
46-
class Wrapper extends Adapter\Http
47-
{
48-
public function __call($method, $args)
38+
public function testChallengeClient()
4939
{
50-
return call_user_func_array([$this, $method], $args);
40+
$this->_wrapper->setResponse(new Response());
41+
$this->_wrapper->challengeClient();
5142
}
5243
}

0 commit comments

Comments
 (0)