コード例 #1
0
ファイル: AutoDiscoverTest.php プロジェクト: pnaq57/zf2demo
 /**
  * @group ZF-6689
  */
 public function testNoReturnIsOneWayCallInAddFunction()
 {
     $this->server->addFunction('\\ZendTest\\Soap\\TestAsset\\OneWay');
     $this->bindWsdl($this->server->generate());
     $this->assertSpecificNodeNumberInXPath(1, '//wsdl:portType/wsdl:operation[@name="OneWay"]/wsdl:input');
     $this->assertSpecificNodeNumberInXPath(0, '//wsdl:portType/wsdl:operation[@name="OneWay"]/wsdl:output');
     $this->assertValidWSDL($this->dom);
     $this->testDocumentNodes();
 }
コード例 #2
0
ファイル: AutoDiscoverTest.php プロジェクト: nieldm/zf2
 /**
  * @group ZF-4117
  */
 public function testChangeWsdlUriInConstructor()
 {
     $scriptUri = 'http://localhost/my_script.php';
     $server = new AutoDiscover(null, "http://example.com/service.php");
     $server->setServiceName("TestService");
     $server->addFunction('\\ZendTest\\Soap\\TestAsset\\TestFunc');
     $wsdlOutput = $server->toXml();
     $this->assertNotContains($scriptUri, $wsdlOutput);
     $this->assertContains("http://example.com/service.php", $wsdlOutput);
 }
コード例 #3
0
    /**
     * @group ZF-6689
     */
    public function testNoReturnIsOneWayCallInAddFunction()
    {
        $autodiscover = new AutoDiscover();
        $autodiscover->addFunction('\ZendTest\Soap\TestAsset\OneWay');
        $wsdl = $autodiscover->toXml();

        $this->assertContains(
            '<operation name="ZendTest.Soap.TestAsset.OneWay"><documentation>@param string $message</documentation><input message="tns:ZendTest.Soap.TestAsset.OneWayIn"/></operation>',
            $wsdl
        );
    }