Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
borodulin committed Apr 27, 2018
1 parent 8031e72 commit 4a1ccb5
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 18 deletions.
6 changes: 3 additions & 3 deletions WsdlGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -507,14 +507,14 @@ protected function injectDom(\DOMDocument $dom, \DOMElement $target, \DOMNode $s
protected function buildDOM($serviceUrl, $encoding)
{
$xml = <<<XML
<?xml version="1.0" encoding="$encoding"?>
<?xml version="1.0" encoding="{$encoding}"?>
<definitions name="{$this->serviceName}" targetNamespace="{$this->namespace}"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns="http://schemas.xmlsoap.org/wsdl/">
xmlns:tns="{$this->namespace}"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap-enc="http://schemas.xmlsoap.org/soap/encoding/">
xmlns:soap-enc="http://schemas.xmlsoap.org/soap/encoding/"
</definitions>
XML;

Expand Down
4 changes: 4 additions & 0 deletions codeception.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,7 @@ extensions:
- Codeception\Extension\RunFailed
settings:
bootstrap: _bootstrap.php
#modules:
# config:
# Yii2:
# configFile: 'tests/app/config/test-config.php'
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
}
},
"require": {
"php": ">=5.4.0",
"yiisoft/yii2": ">=2.0.5"
"php": ">=5.6.0",
"yiisoft/yii2": ">=2.0.6"
},
"require-dev": {
"yiisoft/yii2-coding-standards": "~2.0.3",
Expand Down
23 changes: 16 additions & 7 deletions tests/acceptance.suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,19 @@

actor: AcceptanceTester
modules:
enabled:
- \Helper\Acceptance
- Yii2
- Asserts
config:
Yii2:
configFile: 'tests/app/config/test-config.php'
enabled:
# - PhpBrowser:
# url: http://localhost/
- \Helper\Acceptance
# - SOAP:
# depends: PhpBrowser
# endpoint: http://localhost/api/soap/
# - Yii2
- Asserts
- REST:
url: /
depends: Yii2
part: Json
config:
Yii2:
configFile: 'tests/app/config/test-config.php'
2 changes: 2 additions & 0 deletions tests/acceptance/SoapCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,7 @@ public function _after(AcceptanceTester $I)
// tests
public function tryToTest(AcceptanceTester $I)
{
$I->sendGET('api/soap');
$I->canSeeResponseJsonMatchesXpath('/');
}
}
6 changes: 3 additions & 3 deletions tests/acceptance/_bootstrap.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
defined('YII_DEBUG') or define('YII_DEBUG', true);
defined('YII_ENV') or define('YII_ENV', 'test');
defined('YII_APP_BASE_PATH') or define('YII_APP_BASE_PATH', __DIR__ . '/../../');
defined('YII_APP_BASE_PATH') or define('YII_APP_BASE_PATH', __DIR__ . '/../app/');

require_once(YII_APP_BASE_PATH . '/vendor/autoload.php');
require_once(YII_APP_BASE_PATH . '/vendor/yiisoft/yii2/Yii.php');
require_once(YII_APP_BASE_PATH . '../../vendor/autoload.php');
require_once(YII_APP_BASE_PATH . '../../vendor/yiisoft/yii2/Yii.php');
6 changes: 5 additions & 1 deletion tests/app/config/test-config.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,12 @@
'@bower' => '@vendor/bower-asset',
'@npm' => '@vendor/npm-asset',
],
'vendorPath' => dirname(__DIR__) . '/vendor',
'vendorPath' => dirname(__DIR__) . '/../../vendor',
'controllerNamespace' => 'conquer\services\tests\app\controllers',
'components' => [
'urlManager' => [
'enablePrettyUrl' => true,
'showScriptName' => false,
],
],
];
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@
* Class SoapController
* @package conquer\services\tests\app\controllers
*/
class SoapController extends Controller
class ApiController extends Controller
{
public $enableCsrfValidation = false;

public function actions()
{
return [
Expand All @@ -27,12 +29,17 @@ public function actions()
];
}
/**
* @param SoapModel $myClass
* @param conquer\services\tests\app\models\SoapModel $myClass
* @return string
* @soap
*/
public function soapTest($myClass)
{
return get_class($myClass);
}

public function actionIndex()
{
return 'ok';
}
}

0 comments on commit 4a1ccb5

Please sign in to comment.