diff --git a/app/code/Magento/Eav/Test/Unit/Model/AttributeSetRepositoryTest.php b/app/code/Magento/Eav/Test/Unit/Model/AttributeSetRepositoryTest.php index f167d557de36d0960ef2856c3bf2f9bee4e5c326..5975bf3b5f422e39a24faf4c58e8c4d3354bc50b 100644 --- a/app/code/Magento/Eav/Test/Unit/Model/AttributeSetRepositoryTest.php +++ b/app/code/Magento/Eav/Test/Unit/Model/AttributeSetRepositoryTest.php @@ -42,6 +42,9 @@ class AttributeSetRepositoryTest extends \PHPUnit_Framework_TestCase */ private $resultFactoryMock; + /** + * @return void + */ protected function setUp() { $this->resourceMock = $this->getMock( @@ -82,6 +85,9 @@ class AttributeSetRepositoryTest extends \PHPUnit_Framework_TestCase ); } + /** + * @return void + */ public function testGet() { $attributeSetId = 1; @@ -93,6 +99,7 @@ class AttributeSetRepositoryTest extends \PHPUnit_Framework_TestCase } /** + * @return void * @expectedException \Magento\Framework\Exception\NoSuchEntityException * @expectedExceptionMessage No such entity with id = 9999 */ @@ -105,6 +112,9 @@ class AttributeSetRepositoryTest extends \PHPUnit_Framework_TestCase $this->model->get($attributeSetId); } + /** + * @return void + */ public function testSave() { $attributeSetMock = $this->getMock('Magento\Eav\Model\Entity\Attribute\Set', [], [], '', false); @@ -113,6 +123,7 @@ class AttributeSetRepositoryTest extends \PHPUnit_Framework_TestCase } /** + * @return void * @expectedException \Magento\Framework\Exception\CouldNotSaveException * @expectedExceptionMessage There was an error saving attribute set. */ @@ -125,6 +136,9 @@ class AttributeSetRepositoryTest extends \PHPUnit_Framework_TestCase $this->model->save($attributeSetMock); } + /** + * @return void + */ public function testDelete() { $attributeSetMock = $this->getMock('Magento\Eav\Model\Entity\Attribute\Set', [], [], '', false); @@ -133,6 +147,7 @@ class AttributeSetRepositoryTest extends \PHPUnit_Framework_TestCase } /** + * @return void * @expectedException \Magento\Framework\Exception\CouldNotDeleteException * @expectedExceptionMessage There was an error deleting attribute set. */ @@ -146,6 +161,7 @@ class AttributeSetRepositoryTest extends \PHPUnit_Framework_TestCase } /** + * @return void * @expectedException \Magento\Framework\Exception\CouldNotDeleteException * @expectedExceptionMessage Default attribute set can not be deleted */ @@ -158,6 +174,9 @@ class AttributeSetRepositoryTest extends \PHPUnit_Framework_TestCase $this->model->delete($attributeSetMock); } + /** + * @return void + */ public function testDeleteById() { $attributeSetId = 1; @@ -169,6 +188,9 @@ class AttributeSetRepositoryTest extends \PHPUnit_Framework_TestCase $this->assertTrue($this->model->deleteById($attributeSetId)); } + /** + * @return void + */ public function testGetList() { $entityTypeCode = 'entity_type_code_value'; diff --git a/app/code/Magento/GoogleShopping/Test/Unit/Model/MassOperationsTest.php b/app/code/Magento/GoogleShopping/Test/Unit/Model/MassOperationsTest.php index 313d100c2b8fbcd6f96ed6c4312d7a01ed0b04ea..fa6854a990f3b44eec48499b1285c6cb9debe660 100644 --- a/app/code/Magento/GoogleShopping/Test/Unit/Model/MassOperationsTest.php +++ b/app/code/Magento/GoogleShopping/Test/Unit/Model/MassOperationsTest.php @@ -43,6 +43,9 @@ class MassOperationsTest extends \PHPUnit_Framework_TestCase /** @var \Magento\GoogleShopping\Model\Flag|\PHPUnit_Framework_MockObject_MockObject */ protected $flag; + /** + * @return void + */ protected function setUp() { $this->collectionFactory = $this->getMockBuilder( @@ -80,6 +83,9 @@ class MassOperationsTest extends \PHPUnit_Framework_TestCase ); } + /** + * @return void + */ public function testAddProducts() { $products = ['1','2']; @@ -93,6 +99,9 @@ class MassOperationsTest extends \PHPUnit_Framework_TestCase $this->assertEquals($this->massOperations->addProducts($products, 1), $this->massOperations); } + /** + * @return void + */ public function testAddProductsExpiredFlag() { $products = ['1','2']; @@ -102,8 +111,9 @@ class MassOperationsTest extends \PHPUnit_Framework_TestCase } /** - * @dataProvider dataAddProductsExceptions * @param string $exception + * @return void + * @dataProvider dataAddProductsExceptions */ public function testAddProductsExceptions($exception) { @@ -132,6 +142,9 @@ class MassOperationsTest extends \PHPUnit_Framework_TestCase ]; } + /** + * @return void + */ public function testSynchronizeItems() { $collection = $this->getMockBuilder('Magento\GoogleShopping\Model\Resource\Item\Collection') @@ -154,6 +167,9 @@ class MassOperationsTest extends \PHPUnit_Framework_TestCase $this->massOperations->synchronizeItems([1]); } + /** + * @return void + */ public function testSynchronizeItemsWithException() { $collection = $this->getMockBuilder('Magento\GoogleShopping\Model\Resource\Item\Collection') @@ -182,6 +198,9 @@ class MassOperationsTest extends \PHPUnit_Framework_TestCase $this->massOperations->synchronizeItems([1]); } + /** + * @return void + */ public function testDeleteItems() { $item = $this->getMockBuilder('Magento\GoogleShopping\Model\Item')->disableOriginalConstructor()->getMock(); @@ -206,6 +225,9 @@ class MassOperationsTest extends \PHPUnit_Framework_TestCase $this->massOperations->deleteItems([1]); } + /** + * @return void + */ public function testDeleteItemsWitException() { $product = $this->getMockBuilder('Magento\Catalog\Model\Product')->disableOriginalConstructor() diff --git a/app/code/Magento/Integration/Test/Unit/Service/V1/OauthTest.php b/app/code/Magento/Integration/Test/Unit/Service/V1/OauthTest.php index e2815fd4b5d3f248169f094d64d69ba07a0349d0..01d17a14abf7fdaa7f6dcfdd141e3ffce7872414 100644 --- a/app/code/Magento/Integration/Test/Unit/Service/V1/OauthTest.php +++ b/app/code/Magento/Integration/Test/Unit/Service/V1/OauthTest.php @@ -46,6 +46,9 @@ class OauthTest extends \PHPUnit_Framework_TestCase */ private $_tokenFactoryMock; + /** + * @return void + */ protected function setUp() { $this->_consumerFactory = $this->getMockBuilder( @@ -108,6 +111,9 @@ class OauthTest extends \PHPUnit_Framework_TestCase $this->_emptyConsumerMock->expects($this->any())->method('getId')->will($this->returnValue(null)); } + /** + * @return void + */ public function testDelete() { $this->_consumerMock->expects( @@ -133,6 +139,7 @@ class OauthTest extends \PHPUnit_Framework_TestCase } /** + * @return void * @expectedException \Magento\Framework\Exception\IntegrationException * @expectedExceptionMessage Consumer with ID '1' does not exist. */ @@ -144,6 +151,9 @@ class OauthTest extends \PHPUnit_Framework_TestCase $this->_service->deleteConsumer(self::VALUE_CONSUMER_ID); } + /** + * @return void + */ public function testCreateAccessTokenAndClearExisting() { @@ -182,6 +192,9 @@ class OauthTest extends \PHPUnit_Framework_TestCase $this->assertTrue($this->_service->createAccessToken(self::VALUE_CONSUMER_ID, true)); } + /** + * @return void + */ public function testCreateAccessTokenWithoutClearingExisting() { $this->_consumerMock->expects( @@ -207,6 +220,9 @@ class OauthTest extends \PHPUnit_Framework_TestCase $this->assertFalse($this->_service->createAccessToken(self::VALUE_CONSUMER_ID, false)); } + /** + * @return void + */ public function testCreateAccessTokenInvalidConsumerId() { $this->_consumerMock->expects( @@ -250,6 +266,9 @@ class OauthTest extends \PHPUnit_Framework_TestCase $this->assertTrue($this->_service->createAccessToken(0, false)); } + /** + * @return void + */ public function testLoadConsumer() { $this->_consumerMock->expects( @@ -268,6 +287,7 @@ class OauthTest extends \PHPUnit_Framework_TestCase } /** + * @return void * @expectedException \Magento\Framework\Oauth\Exception * @expectedExceptionMessage Unexpected error. Unable to load oAuth consumer account. */ @@ -285,6 +305,9 @@ class OauthTest extends \PHPUnit_Framework_TestCase $this->_service->loadConsumer(self::VALUE_CONSUMER_ID); } + /** + * @return void + */ public function testLoadConsumerByKey() { $this->_consumerMock->expects( @@ -304,6 +327,7 @@ class OauthTest extends \PHPUnit_Framework_TestCase } /** + * @return void * @expectedException \Magento\Framework\Oauth\Exception * @expectedExceptionMessage Unexpected error. Unable to load oAuth consumer account. */ @@ -321,6 +345,9 @@ class OauthTest extends \PHPUnit_Framework_TestCase $this->_service->loadConsumerByKey(self::VALUE_CONSUMER_KEY); } + /** + * @return void + */ public function testDeleteToken() { $this->_consumerMock->expects( @@ -346,6 +373,9 @@ class OauthTest extends \PHPUnit_Framework_TestCase $this->assertTrue($this->_service->deleteIntegrationToken(self::VALUE_CONSUMER_ID)); } + /** + * @return void + */ public function testDeleteTokenNegative() { $this->_consumerMock->expects( @@ -371,6 +401,9 @@ class OauthTest extends \PHPUnit_Framework_TestCase $this->assertFalse($this->_service->deleteIntegrationToken(null)); } + /** + * @return void + */ public function testGetAccessTokenNoAccess() { $this->_consumerMock->expects( @@ -394,6 +427,9 @@ class OauthTest extends \PHPUnit_Framework_TestCase $this->assertFalse($this->_service->getAccessToken(self::VALUE_CONSUMER_ID), false); } + /** + * @return void + */ public function testGetAccessSuccess() { $this->_consumerMock->expects( diff --git a/app/code/Magento/Quote/Test/Unit/Model/BillingAddressManagementTest.php b/app/code/Magento/Quote/Test/Unit/Model/BillingAddressManagementTest.php index 185eb9f12a8a4f785644e53cc2bcc4ff2b2660d2..244c1fb1778afd8d497c28b47199b009c9ac89f4 100644 --- a/app/code/Magento/Quote/Test/Unit/Model/BillingAddressManagementTest.php +++ b/app/code/Magento/Quote/Test/Unit/Model/BillingAddressManagementTest.php @@ -26,6 +26,9 @@ class BillingAddressManagementTest extends \PHPUnit_Framework_TestCase */ protected $validatorMock; + /** + * @return void + */ protected function setUp() { $this->quoteRepositoryMock = $this->getMock('\Magento\Quote\Model\QuoteRepository', [], [], '', false); @@ -34,6 +37,9 @@ class BillingAddressManagementTest extends \PHPUnit_Framework_TestCase $this->model = new BillingAddressManagement($this->quoteRepositoryMock, $this->validatorMock, $logger); } + /** + * @return void + */ public function testGetAddress() { $quoteMock = $this->getMock('\Magento\Quote\Model\Quote', [], [], '', false); @@ -48,6 +54,7 @@ class BillingAddressManagementTest extends \PHPUnit_Framework_TestCase /** + * @return void * @expectedException \Magento\Framework\Exception\NoSuchEntityException * @expectedExceptionMessage error123 */ @@ -66,6 +73,9 @@ class BillingAddressManagementTest extends \PHPUnit_Framework_TestCase $this->model->assign('cartId', $address); } + /** + * @return void + */ public function testSetAddress() { $address = $this->getMock('Magento\Quote\Model\Quote\Address', [], [], '', false, false); @@ -93,6 +103,7 @@ class BillingAddressManagementTest extends \PHPUnit_Framework_TestCase } /** + * @return void * @expectedException \Magento\Framework\Exception\InputException * @expectedExceptionMessage Unable to save address. Please, check input data. */ diff --git a/app/code/Magento/Quote/Test/Unit/Model/Quote/Item/RepositoryTest.php b/app/code/Magento/Quote/Test/Unit/Model/Quote/Item/RepositoryTest.php index 12092c9c8a6c959d069056785d2536c33b3f7ca6..b90d93933827cbe676a413b79cbc4ed2e0d615b4 100644 --- a/app/code/Magento/Quote/Test/Unit/Model/Quote/Item/RepositoryTest.php +++ b/app/code/Magento/Quote/Test/Unit/Model/Quote/Item/RepositoryTest.php @@ -51,6 +51,9 @@ class RepositoryTest extends \PHPUnit_Framework_TestCase */ protected $itemDataFactoryMock; + /** + * @return void + */ protected function setUp() { $this->quoteRepositoryMock = @@ -74,6 +77,7 @@ class RepositoryTest extends \PHPUnit_Framework_TestCase /** * @param null|string|bool|int|float $value + * @return void * @expectedException \Magento\Framework\Exception\InputException * @expectedExceptionMessage Invalid value of * @dataProvider addItemWithInvalidQtyDataProvider @@ -84,6 +88,9 @@ class RepositoryTest extends \PHPUnit_Framework_TestCase $this->repository->save($this->dataMock); } + /** + * @return array + */ public function addItemWithInvalidQtyDataProvider() { return [ @@ -98,6 +105,7 @@ class RepositoryTest extends \PHPUnit_Framework_TestCase } /** + * @return void * @expectedException \Magento\Framework\Exception\CouldNotSaveException * @expectedExceptionMessage Could not save quote */ @@ -125,6 +133,9 @@ class RepositoryTest extends \PHPUnit_Framework_TestCase $this->repository->save($this->dataMock); } + /** + * @return void + */ public function testSave() { $cartId = 13; @@ -150,6 +161,7 @@ class RepositoryTest extends \PHPUnit_Framework_TestCase } /** + * @return void * @expectedException \Magento\Framework\Exception\NoSuchEntityException * @expectedExceptionMessage Cart 11 doesn't contain item 5 */ @@ -171,6 +183,7 @@ class RepositoryTest extends \PHPUnit_Framework_TestCase } /** + * @return void * @expectedException \Magento\Framework\Exception\CouldNotSaveException * @expectedExceptionMessage Could not save quote */ @@ -205,6 +218,9 @@ class RepositoryTest extends \PHPUnit_Framework_TestCase $this->repository->save($this->dataMock); } + /** + * @return void + */ public function testUpdateItem() { $cartId = 11; @@ -236,6 +252,7 @@ class RepositoryTest extends \PHPUnit_Framework_TestCase } /** + * @return void * @expectedException \Magento\Framework\Exception\NoSuchEntityException * @expectedExceptionMessage Cart 11 doesn't contain item 5 */ @@ -255,6 +272,7 @@ class RepositoryTest extends \PHPUnit_Framework_TestCase } /** + * @return void * @expectedException \Magento\Framework\Exception\CouldNotSaveException * @expectedExceptionMessage Could not remove item from quote */ @@ -281,6 +299,9 @@ class RepositoryTest extends \PHPUnit_Framework_TestCase $this->repository->delete($this->dataMock); } + /** + * @return void + */ public function testDelete() { $cartId = 11; @@ -298,6 +319,9 @@ class RepositoryTest extends \PHPUnit_Framework_TestCase $this->repository->delete($this->dataMock); } + /** + * @return void + */ public function testGetList() { $quoteMock = $this->getMock('Magento\Quote\Model\Quote', [], [], '', false); @@ -310,6 +334,9 @@ class RepositoryTest extends \PHPUnit_Framework_TestCase $this->assertEquals([$itemMock], $this->repository->getList(33)); } + /** + * @return void + */ public function testDeleteById() { $cartId = 11; diff --git a/app/code/Magento/Sales/Test/Unit/Controller/Adminhtml/Order/Creditmemo/CancelTest.php b/app/code/Magento/Sales/Test/Unit/Controller/Adminhtml/Order/Creditmemo/CancelTest.php index a1d0d740c0d969d1158c9d3b93baacc096929906..bc849016a87c4412fd84dcc98f57a1cd7fca1185 100644 --- a/app/code/Magento/Sales/Test/Unit/Controller/Adminhtml/Order/Creditmemo/CancelTest.php +++ b/app/code/Magento/Sales/Test/Unit/Controller/Adminhtml/Order/Creditmemo/CancelTest.php @@ -85,6 +85,9 @@ class CancelTest extends \PHPUnit_Framework_TestCase */ protected $resultForwardMock; + /** + * @return void + */ public function setUp() { $this->creditmemoMock = $this->getMockBuilder('Magento\Sales\Model\Order\Creditmemo') @@ -170,6 +173,9 @@ class CancelTest extends \PHPUnit_Framework_TestCase ); } + /** + * @return void + */ public function testExecuteModelException() { $id = 123; @@ -202,6 +208,9 @@ class CancelTest extends \PHPUnit_Framework_TestCase ); } + /** + * @return void + */ public function testExecuteException() { $id = 321; @@ -234,6 +243,9 @@ class CancelTest extends \PHPUnit_Framework_TestCase ); } + /** + * @return void + */ public function testExecuteNoCreditmemo() { $this->requestMock->expects($this->any()) @@ -257,6 +269,9 @@ class CancelTest extends \PHPUnit_Framework_TestCase ); } + /** + * @return void + */ public function testExecute() { $id = '111'; diff --git a/app/code/Magento/Sales/Test/Unit/Controller/Adminhtml/Order/Creditmemo/VoidTest.php b/app/code/Magento/Sales/Test/Unit/Controller/Adminhtml/Order/Creditmemo/VoidTest.php index a49707edf6f335fa0c5c6cb6193bacbb213e7a1e..fe28217d346f7f1872c40c83709182509da12e5d 100644 --- a/app/code/Magento/Sales/Test/Unit/Controller/Adminhtml/Order/Creditmemo/VoidTest.php +++ b/app/code/Magento/Sales/Test/Unit/Controller/Adminhtml/Order/Creditmemo/VoidTest.php @@ -91,6 +91,9 @@ class VoidTest extends \PHPUnit_Framework_TestCase */ protected $resultForwardMock; + /** + * @return void + */ public function setUp() { $this->creditmemoMock = $this->getMockBuilder('Magento\Sales\Model\Order\Creditmemo') @@ -180,6 +183,9 @@ class VoidTest extends \PHPUnit_Framework_TestCase ); } + /** + * @return void + */ public function testExecuteNoCreditmemo() { $this->requestMock->expects($this->any()) @@ -203,6 +209,9 @@ class VoidTest extends \PHPUnit_Framework_TestCase ); } + /** + * @return void + */ public function testExecuteModelException() { $id = 123; @@ -236,6 +245,9 @@ class VoidTest extends \PHPUnit_Framework_TestCase ); } + /** + * @return void + */ public function testExecuteException() { $id = 321; @@ -269,6 +281,9 @@ class VoidTest extends \PHPUnit_Framework_TestCase ); } + /** + * @return void + */ public function testExecute() { $id = '111'; diff --git a/app/code/Magento/Sales/Test/Unit/Controller/Adminhtml/Order/Invoice/CancelTest.php b/app/code/Magento/Sales/Test/Unit/Controller/Adminhtml/Order/Invoice/CancelTest.php index bb95c17145af3b260d40510348e46a4d8b6fb967..3575638720b4aebf55f90d9f00ff0f30a716bd5d 100755 --- a/app/code/Magento/Sales/Test/Unit/Controller/Adminhtml/Order/Invoice/CancelTest.php +++ b/app/code/Magento/Sales/Test/Unit/Controller/Adminhtml/Order/Invoice/CancelTest.php @@ -64,6 +64,9 @@ class CancelTest extends \PHPUnit_Framework_TestCase */ protected $controller; + /** + * @return void + */ public function setUp() { $objectManager = new ObjectManager($this); @@ -145,6 +148,9 @@ class CancelTest extends \PHPUnit_Framework_TestCase ); } + /** + * @return void + */ public function testExecute() { $invoiceId = 2; @@ -217,6 +223,9 @@ class CancelTest extends \PHPUnit_Framework_TestCase $this->assertSame($resultRedirect, $this->controller->execute()); } + /** + * @return void + */ public function testExecuteNoInvoice() { $invoiceId = 2; @@ -251,6 +260,9 @@ class CancelTest extends \PHPUnit_Framework_TestCase $this->assertSame($resultForward, $this->controller->execute()); } + /** + * @return void + */ public function testExecuteModelException() { $invoiceId = 2; @@ -300,6 +312,9 @@ class CancelTest extends \PHPUnit_Framework_TestCase $this->assertSame($resultRedirect, $this->controller->execute()); } + /** + * @return void + */ public function testExecuteException() { $invoiceId = 2; diff --git a/app/code/Magento/Sales/Test/Unit/Controller/Adminhtml/Order/Invoice/CaptureTest.php b/app/code/Magento/Sales/Test/Unit/Controller/Adminhtml/Order/Invoice/CaptureTest.php index 4ffad4d869e38b3b2c970271039b11f4261519f6..0e57e1af6c5198a9b4d45cdd921afa10b7b9745e 100755 --- a/app/code/Magento/Sales/Test/Unit/Controller/Adminhtml/Order/Invoice/CaptureTest.php +++ b/app/code/Magento/Sales/Test/Unit/Controller/Adminhtml/Order/Invoice/CaptureTest.php @@ -64,6 +64,9 @@ class CaptureTest extends \PHPUnit_Framework_TestCase */ protected $controller; + /** + * @return void + */ public function setUp() { $objectManager = new ObjectManager($this); @@ -145,6 +148,9 @@ class CaptureTest extends \PHPUnit_Framework_TestCase ); } + /** + * @return void + */ public function testExecute() { $invoiceId = 2; @@ -218,6 +224,9 @@ class CaptureTest extends \PHPUnit_Framework_TestCase $this->assertSame($resultRedirect, $this->controller->execute()); } + /** + * @return void + */ public function testExecuteNoInvoice() { $invoiceId = 2; @@ -252,6 +261,9 @@ class CaptureTest extends \PHPUnit_Framework_TestCase $this->assertSame($resultForward, $this->controller->execute()); } + /** + * @return void + */ public function testExecuteModelException() { $invoiceId = 2; @@ -301,6 +313,9 @@ class CaptureTest extends \PHPUnit_Framework_TestCase $this->assertSame($resultRedirect, $this->controller->execute()); } + /** + * @return void + */ public function testExecuteException() { $invoiceId = 2; diff --git a/app/code/Magento/Sales/Test/Unit/Controller/Adminhtml/Order/Invoice/VoidTest.php b/app/code/Magento/Sales/Test/Unit/Controller/Adminhtml/Order/Invoice/VoidTest.php index 9f05c0e560b3531b5d306c1dc38cd1692c9253e3..21d1f3f644b4a43d25118b3db9ae0d2799726461 100755 --- a/app/code/Magento/Sales/Test/Unit/Controller/Adminhtml/Order/Invoice/VoidTest.php +++ b/app/code/Magento/Sales/Test/Unit/Controller/Adminhtml/Order/Invoice/VoidTest.php @@ -69,6 +69,9 @@ class VoidTest extends \PHPUnit_Framework_TestCase */ protected $resultForwardFactoryMock; + /** + * @return void + */ public function setUp() { $objectManager = new ObjectManager($this); @@ -158,6 +161,9 @@ class VoidTest extends \PHPUnit_Framework_TestCase ); } + /** + * @return void + */ public function testExecute() { $invoiceId = 2; @@ -230,6 +236,9 @@ class VoidTest extends \PHPUnit_Framework_TestCase $this->assertSame($resultRedirect, $this->controller->execute()); } + /** + * @return void + */ public function testExecuteNoInvoice() { $invoiceId = 2; @@ -270,6 +279,9 @@ class VoidTest extends \PHPUnit_Framework_TestCase $this->assertSame($resultForward, $this->controller->execute()); } + /** + * @return void + */ public function testExecuteModelException() { $invoiceId = 2; diff --git a/app/code/Magento/Tax/Test/Unit/Model/TaxClass/RepositoryTest.php b/app/code/Magento/Tax/Test/Unit/Model/TaxClass/RepositoryTest.php index bde084607813f7d21b8c0ddddc9e4bf55f4585eb..80894cab62e2a22b77480e6f851031b07da9d144 100644 --- a/app/code/Magento/Tax/Test/Unit/Model/TaxClass/RepositoryTest.php +++ b/app/code/Magento/Tax/Test/Unit/Model/TaxClass/RepositoryTest.php @@ -47,6 +47,9 @@ class RepositoryTest extends \PHPUnit_Framework_TestCase */ protected $taxClassCollectionFactory; + /** + * @return void + */ protected function setUp() { $this->objectManager = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this); @@ -93,6 +96,9 @@ class RepositoryTest extends \PHPUnit_Framework_TestCase ); } + /** + * @return void + */ public function testDelete() { $taxClass = $this->getMock('\Magento\Tax\Model\ClassModel', [], [], '', false); @@ -103,6 +109,7 @@ class RepositoryTest extends \PHPUnit_Framework_TestCase } /** + * @return void * @expectedException \Magento\Framework\Exception\CouldNotDeleteException * @expectedExceptionMessage Some Message */ @@ -117,6 +124,9 @@ class RepositoryTest extends \PHPUnit_Framework_TestCase $this->model->delete($taxClass); } + /** + * @return void + */ public function testDeleteWithException() { $taxClass = $this->getMock('\Magento\Tax\Model\ClassModel', [], [], '', false); @@ -128,6 +138,9 @@ class RepositoryTest extends \PHPUnit_Framework_TestCase $this->assertFalse($this->model->delete($taxClass)); } + /** + * @return void + */ public function testGet() { $taxClass = $this->getMock('\Magento\Tax\Api\Data\TaxClassInterface'); @@ -140,7 +153,10 @@ class RepositoryTest extends \PHPUnit_Framework_TestCase $this->assertEquals($taxClass, $this->model->get($classId)); } - + + /** + * @return void + */ public function testDeleteById() { $taxClass = $this->getMock('\Magento\Tax\Model\ClassModel', [], [], '', false); @@ -158,6 +174,9 @@ class RepositoryTest extends \PHPUnit_Framework_TestCase $this->assertTrue($this->model->deleteById($classId)); } + /** + * @return void + */ public function testGetList() { $taxClassOne = $this->getMock('\Magento\Tax\Api\Data\TaxClassInterface'); @@ -195,6 +214,9 @@ class RepositoryTest extends \PHPUnit_Framework_TestCase $this->assertEquals($this->searchResultMock, $this->model->getList($searchCriteria)); } + /** + * @return void + */ public function testSave() { $taxClass = $this->getMock('\Magento\Tax\Model\ClassModel', [], [], '', false); @@ -217,6 +239,7 @@ class RepositoryTest extends \PHPUnit_Framework_TestCase } /** + * @return void * @expectedException \Magento\Framework\Exception\InputException * @expectedExceptionMessage Updating classType is not allowed. */ @@ -232,6 +255,7 @@ class RepositoryTest extends \PHPUnit_Framework_TestCase } /** + * @return void * @expectedException \Magento\Framework\Exception\LocalizedException * @expectedExceptionMessage Something went wrong */ @@ -257,6 +281,7 @@ class RepositoryTest extends \PHPUnit_Framework_TestCase } /** + * @return void * @expectedException \Magento\Framework\Exception\LocalizedException * @expectedExceptionMessage A class with the same name already exists for ClassType PRODUCT. */ @@ -282,6 +307,8 @@ class RepositoryTest extends \PHPUnit_Framework_TestCase } /** + * @param string $classType + * @return void * @dataProvider validateTaxClassDataProvider * @expectedException \Magento\Framework\Exception\InputException * @expectedExceptionMessage One or more input exceptions have occurred. @@ -304,6 +331,9 @@ class RepositoryTest extends \PHPUnit_Framework_TestCase $this->model->save($taxClass); } + /** + * @return array + */ public function validateTaxClassDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Data/Test/Unit/StructureTest.php b/lib/internal/Magento/Framework/Data/Test/Unit/StructureTest.php index 796773dde01d647073d4c70f3f446f93c4de195a..17c4e3cf39a648c04bce1183cd38b49ac8448384 100644 --- a/lib/internal/Magento/Framework/Data/Test/Unit/StructureTest.php +++ b/lib/internal/Magento/Framework/Data/Test/Unit/StructureTest.php @@ -12,6 +12,9 @@ class StructureTest extends \PHPUnit_Framework_TestCase */ protected $_structure; + /** + * @return void + */ protected function setUp() { $this->_structure = new \Magento\Framework\Data\Structure(); @@ -19,6 +22,7 @@ class StructureTest extends \PHPUnit_Framework_TestCase /** * @param array $elements + * @return void * @dataProvider importExportElementsDataProvider */ public function testConstructImportExportElements($elements) @@ -63,6 +67,7 @@ class StructureTest extends \PHPUnit_Framework_TestCase /** * @param array $elements + * @return void * @dataProvider importExceptionDataProvider * @expectedException \Magento\Framework\Exception */ @@ -71,6 +76,9 @@ class StructureTest extends \PHPUnit_Framework_TestCase $this->_structure->importElements($elements); } + /** + * @return array + */ public function importExceptionDataProvider() { return [ @@ -130,6 +138,7 @@ class StructureTest extends \PHPUnit_Framework_TestCase /** * @param array $elements + * @return void * @dataProvider importExceptionElementNotFoundDataProvider * @expectedException \OutOfBoundsException */ @@ -138,6 +147,9 @@ class StructureTest extends \PHPUnit_Framework_TestCase $this->_structure->importElements($elements); } + /** + * @return array + */ public function importExceptionElementNotFoundDataProvider() { return [ @@ -155,6 +167,9 @@ class StructureTest extends \PHPUnit_Framework_TestCase ]; } + /** + * @return void + */ public function testCreateGetHasElement() { $data = [uniqid() => uniqid()]; @@ -168,6 +183,7 @@ class StructureTest extends \PHPUnit_Framework_TestCase } /** + * @return void * @expectedException \Magento\Framework\Exception */ public function testCreateElementException() @@ -177,6 +193,9 @@ class StructureTest extends \PHPUnit_Framework_TestCase $this->_structure->createElement($elementId, []); } + /** + * @return void + */ public function testUnsetElement() { $this->_populateSampleStructure(); @@ -191,6 +210,9 @@ class StructureTest extends \PHPUnit_Framework_TestCase $this->assertSame(['one' => [], 'five' => [5]], $this->_structure->exportElements()); } + /** + * @return void + */ public function testSetGetAttribute() { $this->_populateSampleStructure(); @@ -203,6 +225,7 @@ class StructureTest extends \PHPUnit_Framework_TestCase } /** + * @return void * @expectedException \OutOfBoundsException */ public function testSetAttributeNoElementException() @@ -211,9 +234,10 @@ class StructureTest extends \PHPUnit_Framework_TestCase } /** + * @param string $attribute + * @return void * @expectedException \InvalidArgumentException * @dataProvider setAttributeArgumentExceptionDataProvider - * @param string $attribute */ public function testSetAttributeArgumentException($attribute) { @@ -234,6 +258,7 @@ class StructureTest extends \PHPUnit_Framework_TestCase } /** + * @return void * @expectedException \OutOfBoundsException */ public function testGetAttributeNoElementException() @@ -241,6 +266,9 @@ class StructureTest extends \PHPUnit_Framework_TestCase $this->_structure->getAttribute('non-existing', 'foo'); } + /** + * @return void + */ public function testRenameElement() { $this->_populateSampleStructure(); @@ -269,6 +297,9 @@ class StructureTest extends \PHPUnit_Framework_TestCase $this->assertSame(['three.5' => 'th', 'two.5' => 'tw'], $this->_structure->getChildren('four.5')); } + /** + * @return void + */ public function testSetAsChild() { $this->_populateSampleStructure(); @@ -288,6 +319,7 @@ class StructureTest extends \PHPUnit_Framework_TestCase /** * @param int $offset * @param int $expectedOffset + * @return void * @dataProvider setAsChildOffsetDataProvider */ public function testSetAsChildOffset($offset, $expectedOffset) @@ -331,6 +363,7 @@ class StructureTest extends \PHPUnit_Framework_TestCase /** * @param string $elementId * @param string $parentId + * @return void * @expectedException \Magento\Framework\Exception * @dataProvider setAsChildExceptionDataProvider */ @@ -352,6 +385,9 @@ class StructureTest extends \PHPUnit_Framework_TestCase return [['one', 'three'], ['one', 'one']]; } + /** + * @return void + */ public function testUnsetChild() { $this->_populateSampleStructure(); @@ -371,6 +407,7 @@ class StructureTest extends \PHPUnit_Framework_TestCase * @param int $initialOffset * @param int $newOffset * @param int $expectedOffset + * @return void * @dataProvider reorderChildDataProvider */ public function testReorderChild($initialOffset, $newOffset, $expectedOffset) @@ -420,6 +457,7 @@ class StructureTest extends \PHPUnit_Framework_TestCase } /** + * @return void * @expectedException \Magento\Framework\Exception */ public function testReorderChildException() @@ -434,6 +472,7 @@ class StructureTest extends \PHPUnit_Framework_TestCase * @param string $sibling * @param int $delta * @param int $expectedOffset + * @return void * @dataProvider reorderSiblingDataProvider */ public function testReorderToSibling($initialOffset, $sibling, $delta, $expectedOffset) @@ -443,6 +482,9 @@ class StructureTest extends \PHPUnit_Framework_TestCase $this->assertSame($expectedOffset, $this->_structure->reorderToSibling('parent', 'x', $sibling, $delta)); } + /** + * @return array + */ public function reorderSiblingDataProvider() { return [ @@ -472,6 +514,7 @@ class StructureTest extends \PHPUnit_Framework_TestCase } /** + * @return void * @expectedException \Magento\Framework\Exception */ public function testReorderToSiblingException() @@ -483,6 +526,9 @@ class StructureTest extends \PHPUnit_Framework_TestCase $this->_structure->reorderToSibling('one', 'three', 'two', 1); } + /** + * @return void + */ public function testGetChildId() { $this->_populateSampleStructure(); @@ -490,6 +536,9 @@ class StructureTest extends \PHPUnit_Framework_TestCase $this->assertEquals('five', $this->_structure->getChildId('six', 'f')); } + /** + * @return void + */ public function testGetChildrenParentIdChildAlias() { $this->_structure->createElement('one', []); @@ -515,6 +564,7 @@ class StructureTest extends \PHPUnit_Framework_TestCase } /** + * @return void * covers \Magento\Framework\Data\Structure::addToParentGroup * covers \Magento\Framework\Data\Structure::getGroupChildNames */ @@ -558,6 +608,7 @@ class StructureTest extends \PHPUnit_Framework_TestCase /** * Import a sample valid structure + * @return void */ protected function _populateSampleStructure() { @@ -575,6 +626,7 @@ class StructureTest extends \PHPUnit_Framework_TestCase /** * Import a sample structure, suitable for testing elements sort order + * @return void */ protected function _populateSampleSortStructure() { diff --git a/lib/internal/Magento/Framework/Exception/Test/Unit/AuthenticationExceptionTest.php b/lib/internal/Magento/Framework/Exception/Test/Unit/AuthenticationExceptionTest.php index ff9587b60d37bb8b10d231a94c94d267ce1d13a5..50a32d2256421c87e3c85364c60c5fc49052e892 100644 --- a/lib/internal/Magento/Framework/Exception/Test/Unit/AuthenticationExceptionTest.php +++ b/lib/internal/Magento/Framework/Exception/Test/Unit/AuthenticationExceptionTest.php @@ -16,6 +16,9 @@ use Magento\Framework\Phrase; */ class AuthenticationExceptionTest extends \PHPUnit_Framework_TestCase { + /** + * @return void + */ public function testConstructor() { $authenticationException = new AuthenticationException( diff --git a/lib/internal/Magento/Framework/Exception/Test/Unit/AuthorizationExceptionTest.php b/lib/internal/Magento/Framework/Exception/Test/Unit/AuthorizationExceptionTest.php index f91bb0060fdf06fef26e90e37cb181eecbb23012..98ec16f5d181b630600a72aa5747f7bca59ea81f 100644 --- a/lib/internal/Magento/Framework/Exception/Test/Unit/AuthorizationExceptionTest.php +++ b/lib/internal/Magento/Framework/Exception/Test/Unit/AuthorizationExceptionTest.php @@ -10,6 +10,9 @@ use Magento\Framework\Phrase; class AuthorizationExceptionTest extends \PHPUnit_Framework_TestCase { + /** + * @return void + */ public function testConstructor() { $authorizationException = new AuthorizationException( diff --git a/lib/internal/Magento/Framework/Exception/Test/Unit/EmailNotConfirmedExceptionTest.php b/lib/internal/Magento/Framework/Exception/Test/Unit/EmailNotConfirmedExceptionTest.php index 871d1718d235219b10be1191f0b0734120ac6a91..17abc99ed6aa9546d584dfc68dfbfc49291dfba8 100644 --- a/lib/internal/Magento/Framework/Exception/Test/Unit/EmailNotConfirmedExceptionTest.php +++ b/lib/internal/Magento/Framework/Exception/Test/Unit/EmailNotConfirmedExceptionTest.php @@ -16,6 +16,9 @@ use Magento\Framework\Phrase; */ class EmailNotConfirmedExceptionTest extends \PHPUnit_Framework_TestCase { + /** + * @return void + */ public function testConstructor() { $emailNotConfirmedException = new EmailNotConfirmedException( diff --git a/lib/internal/Magento/Framework/Exception/Test/Unit/InvalidEmailOrPasswordExceptionTest.php b/lib/internal/Magento/Framework/Exception/Test/Unit/InvalidEmailOrPasswordExceptionTest.php index 3b7c9d914928a69be3c6ec8c35315f323acc4e74..34fe6d00011400a4b5bf77dc0ab5ff7d39937fe3 100644 --- a/lib/internal/Magento/Framework/Exception/Test/Unit/InvalidEmailOrPasswordExceptionTest.php +++ b/lib/internal/Magento/Framework/Exception/Test/Unit/InvalidEmailOrPasswordExceptionTest.php @@ -16,6 +16,9 @@ use Magento\Framework\Phrase; */ class InvalidEmailOrPasswordExceptionTest extends \PHPUnit_Framework_TestCase { + /** + * @return void + */ public function testConstructor() { $exception = new InvalidEmailOrPasswordException( diff --git a/lib/internal/Magento/Framework/Exception/Test/Unit/LocalizedExceptionTest.php b/lib/internal/Magento/Framework/Exception/Test/Unit/LocalizedExceptionTest.php index 8ad455178565389508b1d2e8a345641456c731c4..a359192c6bbaa0c8cf907e0d450cd8e82c193e9d 100644 --- a/lib/internal/Magento/Framework/Exception/Test/Unit/LocalizedExceptionTest.php +++ b/lib/internal/Magento/Framework/Exception/Test/Unit/LocalizedExceptionTest.php @@ -21,6 +21,9 @@ class LocalizedExceptionTest extends \PHPUnit_Framework_TestCase /** @var string */ private $renderedMessage; + /** + * @return void + */ public function setUp() { $this->defaultRenderer = \Magento\Framework\Phrase::getRenderer(); @@ -34,12 +37,21 @@ class LocalizedExceptionTest extends \PHPUnit_Framework_TestCase \Magento\Framework\Phrase::setRenderer($rendererMock); } + /** + * @return void + */ public function tearDown() { \Magento\Framework\Phrase::setRenderer($this->defaultRenderer); } - /** @dataProvider constructorParametersDataProvider */ + /** + * @param string $message + * @param array $params + * @param string $expectedLogMessage + * @return void + * @dataProvider constructorParametersDataProvider + */ public function testConstructor($message, $params, $expectedLogMessage) { $cause = new \Exception(); @@ -57,6 +69,9 @@ class LocalizedExceptionTest extends \PHPUnit_Framework_TestCase $this->assertSame($cause, $localizeException->getPrevious()); } + /** + * @return array + */ public function constructorParametersDataProvider() { return [ @@ -81,6 +96,9 @@ class LocalizedExceptionTest extends \PHPUnit_Framework_TestCase ]; } + /** + * @return void + */ public function testGetRawMessage() { $message = 'message %1 %2'; @@ -96,6 +114,9 @@ class LocalizedExceptionTest extends \PHPUnit_Framework_TestCase $this->assertEquals($message, $localizeException->getRawMessage()); } + /** + * @return void + */ public function testGetParameters() { $message = 'message %1 %2'; @@ -112,6 +133,9 @@ class LocalizedExceptionTest extends \PHPUnit_Framework_TestCase $this->assertEquals($params, $localizeException->getParameters()); } + /** + * @return void + */ public function testGetLogMessage() { $message = 'message %1 %2'; diff --git a/lib/internal/Magento/Framework/Exception/Test/Unit/NoSuchEntityExceptionTest.php b/lib/internal/Magento/Framework/Exception/Test/Unit/NoSuchEntityExceptionTest.php index 748b2b7653e3ba5c223dde5219e98fcb69cfbfd1..459c8dc7686ddd8c20a7f456a62d1ee3dd156af0 100644 --- a/lib/internal/Magento/Framework/Exception/Test/Unit/NoSuchEntityExceptionTest.php +++ b/lib/internal/Magento/Framework/Exception/Test/Unit/NoSuchEntityExceptionTest.php @@ -26,6 +26,9 @@ class NoSuchEntityExceptionTest extends \PHPUnit_Framework_TestCase */ protected $rendererMock; + /** + * @return void + */ public function setUp() { $this->defaultRenderer = \Magento\Framework\Phrase::getRenderer(); @@ -35,11 +38,17 @@ class NoSuchEntityExceptionTest extends \PHPUnit_Framework_TestCase ->getMock(); } + /** + * @return void + */ public function tearDown() { \Magento\Framework\Phrase::setRenderer($this->defaultRenderer); } + /** + * @return void + */ public function testConstructor() { $this->renderedMessage = 'rendered message'; @@ -69,8 +78,9 @@ class NoSuchEntityExceptionTest extends \PHPUnit_Framework_TestCase } /** - * @param $message - * @param $expectedMessage + * @param string $message + * @param string $expectedMessage + * @return void * @dataProvider constantsDataProvider */ public function testConstants($message, $expectedMessage) @@ -90,6 +100,9 @@ class NoSuchEntityExceptionTest extends \PHPUnit_Framework_TestCase $this->assertSame($expectedMessage, $exception->getMessage()); } + /** + * @return array + */ public function constantsDataProvider() { return [ @@ -104,6 +117,9 @@ class NoSuchEntityExceptionTest extends \PHPUnit_Framework_TestCase ]; } + /** + * @return void + */ public function testSingleField() { $fieldName = 'storeId'; @@ -114,6 +130,9 @@ class NoSuchEntityExceptionTest extends \PHPUnit_Framework_TestCase ); } + /** + * @return void + */ public function testDoubleField() { $website = 'website'; diff --git a/lib/internal/Magento/Framework/Exception/Test/Unit/State/ExpiredExceptionTest.php b/lib/internal/Magento/Framework/Exception/Test/Unit/State/ExpiredExceptionTest.php index 5868f898bb32ce9affe73709f9f002e308ba1d48..dff9552038031074aed2be3d231276f9070b0274 100644 --- a/lib/internal/Magento/Framework/Exception/Test/Unit/State/ExpiredExceptionTest.php +++ b/lib/internal/Magento/Framework/Exception/Test/Unit/State/ExpiredExceptionTest.php @@ -17,6 +17,9 @@ use Magento\Framework\Phrase; */ class ExpiredExceptionTest extends \PHPUnit_Framework_TestCase { + /** + * @return void + */ public function testConstructor() { $instanceClass = 'Magento\Framework\Exception\State\ExpiredException'; diff --git a/lib/internal/Magento/Framework/Exception/Test/Unit/State/InputMismatchExceptionTest.php b/lib/internal/Magento/Framework/Exception/Test/Unit/State/InputMismatchExceptionTest.php index 5fd5940121139396ea4bbff6e2b6d7328b00d57b..b961329ebf424d54d8f54807cb0333d842095cff 100644 --- a/lib/internal/Magento/Framework/Exception/Test/Unit/State/InputMismatchExceptionTest.php +++ b/lib/internal/Magento/Framework/Exception/Test/Unit/State/InputMismatchExceptionTest.php @@ -12,6 +12,9 @@ use Magento\Framework\Phrase; class InputMismatchExceptionTest extends \PHPUnit_Framework_TestCase { + /** + * @return void + */ public function testConstructor() { $instanceClass = 'Magento\Framework\Exception\State\InputMismatchException'; diff --git a/lib/internal/Magento/Framework/Exception/Test/Unit/State/InvalidTransitionExceptionTest.php b/lib/internal/Magento/Framework/Exception/Test/Unit/State/InvalidTransitionExceptionTest.php index d06e1d9fc0d2963bb6467c3e56f0fbb9e5ee2507..8f1d1bea9a67af3f266c42347e8c4c6d699e4dbb 100644 --- a/lib/internal/Magento/Framework/Exception/Test/Unit/State/InvalidTransitionExceptionTest.php +++ b/lib/internal/Magento/Framework/Exception/Test/Unit/State/InvalidTransitionExceptionTest.php @@ -12,6 +12,9 @@ use Magento\Framework\Phrase; class InvalidTransitionExceptionTest extends \PHPUnit_Framework_TestCase { + /** + * @return void + */ public function testConstructor() { $instanceClass = 'Magento\Framework\Exception\State\InvalidTransitionException'; diff --git a/lib/internal/Magento/Framework/Exception/Test/Unit/StateExceptionTest.php b/lib/internal/Magento/Framework/Exception/Test/Unit/StateExceptionTest.php index 9201bf95bd7b2890b7fb92b7c4eb6e1972f72580..463b039fef0e8eb7342a4c1bb2d9c338c66c5bd0 100644 --- a/lib/internal/Magento/Framework/Exception/Test/Unit/StateExceptionTest.php +++ b/lib/internal/Magento/Framework/Exception/Test/Unit/StateExceptionTest.php @@ -16,6 +16,9 @@ use Magento\Framework\Phrase; */ class StateExceptionTest extends \PHPUnit_Framework_TestCase { + /** + * @return void + */ public function testStateExceptionInstance() { $instanceClass = 'Magento\Framework\Exception\StateException'; diff --git a/lib/internal/Magento/Framework/Oauth/Test/Unit/Helper/RequestTest.php b/lib/internal/Magento/Framework/Oauth/Test/Unit/Helper/RequestTest.php index 31f8a93adb38885fcd6deede679a8693befd3629..47c9ebace2597c118ebd9c1d273baf392f59266b 100644 --- a/lib/internal/Magento/Framework/Oauth/Test/Unit/Helper/RequestTest.php +++ b/lib/internal/Magento/Framework/Oauth/Test/Unit/Helper/RequestTest.php @@ -17,6 +17,9 @@ class RequestTest extends \PHPUnit_Framework_TestCase /** @var \Magento\Framework\App\Response\Http */ protected $response; + /** + * @return void + */ protected function setUp() { $this->oauthRequestHelper = new \Magento\Framework\Oauth\Helper\Request(); @@ -29,12 +32,18 @@ class RequestTest extends \PHPUnit_Framework_TestCase ); } + /** + * @return void + */ protected function tearDown() { unset($this->oauthRequestHelper, $this->response); } /** + * @param \Exception $exception + * @param array $expected + * @return void * @dataProvider dataProviderForPrepareErrorResponseTest */ public function testPrepareErrorResponse($exception, $expected) @@ -48,6 +57,9 @@ class RequestTest extends \PHPUnit_Framework_TestCase $this->assertEquals(['oauth_problem' => $expected[0]], $errorResponse); } + /** + * @return array + */ public function dataProviderForPrepareErrorResponseTest() { return [ @@ -70,6 +82,8 @@ class RequestTest extends \PHPUnit_Framework_TestCase } /** + * @param string $url + * @param string $host * @dataProvider hostsDataProvider */ public function testGetRequestUrl($url, $host) @@ -89,6 +103,9 @@ class RequestTest extends \PHPUnit_Framework_TestCase $this->assertEquals($url, $this->oauthRequestHelper->getRequestUrl($httpRequestMock)); } + /** + * @return array + */ public function hostsDataProvider() { return [ diff --git a/lib/internal/Magento/Framework/Oauth/Test/Unit/OauthInputExceptionTest.php b/lib/internal/Magento/Framework/Oauth/Test/Unit/OauthInputExceptionTest.php index 6c183b353e8caa181ffad3c2a5e2d8f7a25180ab..a5b658b59d2bbbabb44448486dfb81e411cb2703 100644 --- a/lib/internal/Magento/Framework/Oauth/Test/Unit/OauthInputExceptionTest.php +++ b/lib/internal/Magento/Framework/Oauth/Test/Unit/OauthInputExceptionTest.php @@ -10,6 +10,9 @@ use Magento\Framework\Phrase; class OauthInputExceptionTest extends \PHPUnit_Framework_TestCase { + /** + * @return void + */ public function testGetAggregatedErrorMessage() { $exception = new OauthInputException(); @@ -24,6 +27,9 @@ class OauthInputExceptionTest extends \PHPUnit_Framework_TestCase ); } + /** + * @return void + */ public function testGetAggregatedErrorMessageNoError() { $exception = new OauthInputException(); diff --git a/lib/internal/Magento/Framework/Validator/Test/Unit/ExceptionTest.php b/lib/internal/Magento/Framework/Validator/Test/Unit/ExceptionTest.php index 812334e635683469dc718e27c55f5724c2aaa58f..1db22e3fdbdfed4ceb3d558c0b9ce5a299805293 100644 --- a/lib/internal/Magento/Framework/Validator/Test/Unit/ExceptionTest.php +++ b/lib/internal/Magento/Framework/Validator/Test/Unit/ExceptionTest.php @@ -13,6 +13,7 @@ class ExceptionTest extends \PHPUnit_Framework_TestCase { /** * Testing \Magento\Framework\Validator\Exception::getMessage + * @return void */ public function testGetMessage() { diff --git a/lib/internal/Magento/Framework/View/Test/Unit/Layout/GeneratorPoolTest.php b/lib/internal/Magento/Framework/View/Test/Unit/Layout/GeneratorPoolTest.php index 818eaf055bb7479f3bd215ae89dfd0bff50709fc..154ff37e00f0a408aa602dd7cfcac1eaf42c07d6 100644 --- a/lib/internal/Magento/Framework/View/Test/Unit/Layout/GeneratorPoolTest.php +++ b/lib/internal/Magento/Framework/View/Test/Unit/Layout/GeneratorPoolTest.php @@ -44,6 +44,9 @@ class GeneratorPoolTest extends \PHPUnit_Framework_TestCase */ protected $model; + /** + * @return void + */ protected function setUp() { // ScheduledStructure @@ -95,6 +98,9 @@ class GeneratorPoolTest extends \PHPUnit_Framework_TestCase } /** + * @param array $schedule + * @param array $expectedSchedule + * @return void * @dataProvider processDataProvider */ public function testProcess($schedule, $expectedSchedule) diff --git a/lib/internal/Magento/Framework/Webapi/Test/Unit/ErrorProcessorTest.php b/lib/internal/Magento/Framework/Webapi/Test/Unit/ErrorProcessorTest.php index b16723a3b119235907880ddd1ec45f573a6e7505..ab378a49c0bdfbfb68ddc350d653a475bcfc2445 100644 --- a/lib/internal/Magento/Framework/Webapi/Test/Unit/ErrorProcessorTest.php +++ b/lib/internal/Magento/Framework/Webapi/Test/Unit/ErrorProcessorTest.php @@ -67,6 +67,8 @@ class ErrorProcessorTest extends \PHPUnit_Framework_TestCase /** * Test render method in JSON format. + * + * @return void */ public function testRenderJson() { @@ -94,7 +96,7 @@ class ErrorProcessorTest extends \PHPUnit_Framework_TestCase * * Method encodes data to JSON and returns it. * - * @param $data + * @param array $data * @return string */ public function callbackJsonEncode($data) @@ -104,6 +106,7 @@ class ErrorProcessorTest extends \PHPUnit_Framework_TestCase /** * Test render method in JSON format with turned on developer mode. + * @return void */ public function testRenderJsonInDeveloperMode() { @@ -128,6 +131,7 @@ class ErrorProcessorTest extends \PHPUnit_Framework_TestCase /** * Test render method in XML format. + * @return void */ public function testRenderXml() { @@ -145,6 +149,7 @@ class ErrorProcessorTest extends \PHPUnit_Framework_TestCase /** * Test render method in XML format with turned on developer mode. + * @return void */ public function testRenderXmlInDeveloperMode() { @@ -165,6 +170,7 @@ class ErrorProcessorTest extends \PHPUnit_Framework_TestCase /** * Test default render format is JSON. + * @return void */ public function testRenderDefaultFormat() { @@ -177,6 +183,7 @@ class ErrorProcessorTest extends \PHPUnit_Framework_TestCase /** * Test maskException method with turned on developer mode. + * @return void */ public function testMaskExceptionInDeveloperMode() { @@ -198,6 +205,11 @@ class ErrorProcessorTest extends \PHPUnit_Framework_TestCase /** * Test sendResponse method with various exceptions * + * @param \Exception $exception + * @param int $expectedHttpCode + * @param string $expectedMessage + * @param array $expectedDetails + * @return void * @dataProvider dataProviderForSendResponseExceptions */ public function testMaskException($exception, $expectedHttpCode, $expectedMessage, $expectedDetails) @@ -213,6 +225,9 @@ class ErrorProcessorTest extends \PHPUnit_Framework_TestCase ); } + /** + * @return array + */ public function dataProviderForSendResponseExceptions() { return [ @@ -270,6 +285,7 @@ class ErrorProcessorTest extends \PHPUnit_Framework_TestCase * @param int $expectedHttpCode * @param string $expectedMessage * @param array $expectedDetails + * @return void */ public function assertMaskedException( $maskedException,