diff --git a/app/code/Magento/Webapi/Test/Unit/_files/test_interfaces.php b/app/code/Magento/Webapi/Test/Unit/_files/test_interfaces.php deleted file mode 100644 index 288a747cefd89cec4182de66890127eebd552806..0000000000000000000000000000000000000000 --- a/app/code/Magento/Webapi/Test/Unit/_files/test_interfaces.php +++ /dev/null @@ -1,31 +0,0 @@ -<?php -/** - * Copyright © 2016 Magento. All rights reserved. - * See COPYING.txt for license details. - */ - -// @codingStandardsIgnoreFile - -namespace Magento\Framework\Module\Service; - -/** - * The list of test interfaces. - */ -interface FooV1Interface -{ - public function someMethod(); -} -interface BarV1Interface -{ - public function someMethod(); -} -interface FooBarV1Interface -{ - public function someMethod(); -} -namespace Magento\Framework\Module\Service\Foo; - -interface BarV1Interface -{ - public function someMethod(); -} diff --git a/app/code/Magento/Webapi/Test/Unit/Model/Soap/ConfigTest.php b/dev/tests/integration/testsuite/Magento/Webapi/Model/Soap/ConfigTest.php similarity index 84% rename from app/code/Magento/Webapi/Test/Unit/Model/Soap/ConfigTest.php rename to dev/tests/integration/testsuite/Magento/Webapi/Model/Soap/ConfigTest.php index aa5d1a7bfab7e5a1858ae9b321d41a1accba3955..74e6728fcee26dd8b3eb0869c770b7b978f0aa6a 100644 --- a/app/code/Magento/Webapi/Test/Unit/Model/Soap/ConfigTest.php +++ b/dev/tests/integration/testsuite/Magento/Webapi/Model/Soap/ConfigTest.php @@ -1,34 +1,32 @@ <?php /** - * Config helper Unit tests. - * * Copyright © 2016 Magento. All rights reserved. * See COPYING.txt for license details. */ +namespace Magento\Webapi\Model\Soap; // @codingStandardsIgnoreFile -/** - * Class implements tests for \Magento\Webapi\Model\Soap\Config class. - */ -namespace Magento\Webapi\Test\Unit\Model\Soap; - class ConfigTest extends \PHPUnit_Framework_TestCase { - /** @var \Magento\Webapi\Model\Soap\Config */ - protected $_soapConfig; + /** + * @var \Magento\Webapi\Model\Soap\Config + */ + private $_soapConfig; - /** @var \Magento\Framework\TestFramework\Unit\Helper\ObjectManager */ - protected $objectManager; + /** + * @var \Magento\TestFramework\Helper\Bootstrap + */ + private $objectManager; /** * Set up helper. */ protected function setUp() { - $this->objectManager = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this); + $this->objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $typeProcessor = $this->objectManager->getObject(\Magento\Framework\Reflection\TypeProcessor::class); + $typeProcessor = $this->objectManager->create(\Magento\Framework\Reflection\TypeProcessor::class); $objectManagerMock = $this->getMockBuilder( \Magento\Framework\App\ObjectManager::class @@ -97,13 +95,17 @@ class ConfigTest extends \PHPUnit_Framework_TestCase $config = new \Magento\Webapi\Model\Config($cacheMock, $readerMock); /** @var $config \Magento\Webapi\Model\ServiceMetadata */ - $serviceMetadata = new \Magento\Webapi\Model\ServiceMetadata( - $config, - $cacheMock, - $classReflection, - $typeProcessor); + $serviceMetadata = $this->objectManager->create( + \Magento\Webapi\Model\ServiceMetadata::class, + [ + 'config' => $config, + 'cache' => $cacheMock, + 'classReflector' => $classReflection, + 'typeProcessor' => $typeProcessor + ] + ); - $this->_soapConfig = $this->objectManager->getObject( + $this->_soapConfig = $this->objectManager->create( \Magento\Webapi\Model\Soap\Config::class, [ 'objectManager' => $objectManagerMock, @@ -111,7 +113,6 @@ class ConfigTest extends \PHPUnit_Framework_TestCase 'serviceMetadata' => $serviceMetadata, ] ); - parent::setUp(); } public function testGetRequestedSoapServices() @@ -162,5 +163,3 @@ class ConfigTest extends \PHPUnit_Framework_TestCase $this->assertEquals($expectedResult, $soapOperation); } } - -require_once realpath(__DIR__ . '/../../_files/test_interfaces.php');