diff --git a/test/Client/DotNetTest.php b/test/Client/DotNetTest.php index e46fac8b..7c9dfbe6 100644 --- a/test/Client/DotNetTest.php +++ b/test/Client/DotNetTest.php @@ -10,6 +10,7 @@ namespace ZendTest\Soap\Client; use PHPUnit_Framework_TestCase; +use Zend\Soap\Client\Common; use Zend\Soap\Client\DotNet as DotNetClient; use ZendTest\Soap\TestAsset\MockCallUserFunc; @@ -92,24 +93,36 @@ public function testCurlClientRequestIsDoneWhenUsingNtlmAuthentication() */ public function testDefaultSoapClientRequestIsDoneWhenNotUsingNtlmAuthentication() { - if (version_compare(phpversion(), '5.5.6', '=') || version_compare(phpversion(), '5.5.7', '=')) { - $this->markTestSkipped('This test is incompatible with PHP 5.5.6-7 only, causes segfault.'); - } - - $soapClient = $this->getMock('Zend\Soap\Client\Common', - array('_doRequest'), - array(array($this->client, '_doRequest'), - null, - array('location' => 'http://unit/test', - 'uri' => 'http://unit/test'))); - - MockCallUserFunc::$mock = true; + $unitTest = $this; + $soapClient = new Common( + function(Common $client, $request, $location, $action, $version, $oneWay = null) use ($unitTest) { + $unitTest->assertEquals('http://unit/test#TestMethod', $action); + $result = '' + . ''; + + $result .= '' + . '' + . '' + . '' + . ''; + + $result .= '' + . ''; + + return $result; + }, + null, + array( + 'location' => 'http://unit/test', + 'uri' => 'http://unit/test' + ) + ); + $this->assertAttributeEquals(false, 'useNtlm', $this->client); + $this->client->setOptions(array('authentication' => 'ntlm', + 'login' => 'username', + 'password' => 'testpass')); $this->client->setSoapClient($soapClient); - $this->client->TestMethod(); - - $this->assertSame('http://unit/test#TestMethod', MockCallUserFunc::$params[3]); - - MockCallUserFunc::$mock = false; + $this->assertInstanceOf('stdClass', $this->client->TestMethod()); } /**