diff vendor/phpunit/phpunit-mock-objects/tests/MockObject/wsdl_class_namespace.phpt @ 0:4c8ae668cc8c

Initial import (non-working)
author Chris Cannam
date Wed, 29 Nov 2017 16:09:58 +0000
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/wsdl_class_namespace.phpt	Wed Nov 29 16:09:58 2017 +0000
@@ -0,0 +1,39 @@
+--TEST--
+PHPUnit_Framework_MockObject_Generator::generateClassFromWsdl('GoogleSearch.wsdl', 'GoogleSearch')
+--SKIPIF--
+<?php
+if (!extension_loaded('soap')) echo 'skip: SOAP extension is required';
+?>
+--FILE--
+<?php
+require __DIR__ . '/../../vendor/autoload.php';
+
+$generator = new PHPUnit_Framework_MockObject_Generator;
+
+print $generator->generateClassFromWsdl(
+  dirname(dirname(__FILE__)) . '/_fixture/GoogleSearch.wsdl',
+  'My\\Space\\GoogleSearch'
+);
+?>
+--EXPECTF--
+namespace My\Space;
+
+class GoogleSearch extends \SoapClient
+{
+    public function __construct($wsdl, array $options)
+    {
+        parent::__construct('%s/GoogleSearch.wsdl', $options);
+    }
+
+    public function doGoogleSearch($key, $q, $start, $maxResults, $filter, $restrict, $safeSearch, $lr, $ie, $oe)
+    {
+    }
+
+    public function doGetCachedPage($key, $url)
+    {
+    }
+
+    public function doSpellingSuggestion($key, $phrase)
+    {
+    }
+}