Skip to content

Commit 0639b9d

Browse files
committed
MAGETWO-31059: Integration tests with fatals, code under test and framework adaptation
1 parent da77205 commit 0639b9d

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed

app/code/Magento/ConfigurableProduct/Model/Product/Type/Configurable.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -779,7 +779,7 @@ protected function _prepareProduct(\Magento\Framework\Object $buyRequest, $produ
779779
}
780780

781781
if (!isset($_result[0])) {
782-
return __('Cannot add the item to shopping cart')->render();
782+
return __('Cannot add the item to shopping cart');
783783
}
784784

785785
/**

app/code/Magento/Downloadable/Model/Product/Type.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ protected function _prepareProduct(\Magento\Framework\Object $buyRequest, $produ
482482
return $result;
483483
}
484484
if ($this->getLinkSelectionRequired($product) && $this->_isStrictProcessMode($processMode)) {
485-
return __('Please specify product link(s).')->render();
485+
return __('Please specify product link(s).');
486486
}
487487
return $result;
488488
}

app/code/Magento/GroupedProduct/Model/Product/Type/Grouped.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ protected function _prepareProduct(\Magento\Framework\Object $buyRequest, $produ
361361
}
362362

363363
if (!isset($_result[0])) {
364-
return __('We cannot process the item.')->render();
364+
return __('We cannot process the item.');
365365
}
366366

367367
if ($isStrictProcessMode) {
@@ -399,7 +399,7 @@ protected function _prepareProduct(\Magento\Framework\Object $buyRequest, $produ
399399
}
400400
}
401401

402-
return __('Please specify the quantity of product(s).')->render();
402+
return __('Please specify the quantity of product(s).');
403403
}
404404

405405
/**

dev/tests/unit/testsuite/Magento/Bundle/Model/Product/Attribute/Source/Price/ViewTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public function testGetOptionTextForExistLabel()
7474
{
7575
$existValue = 1;
7676

77-
$this->assertInstanceOf('Magento\Framework\Phrase', $this->model->getOptionText($existValue));
77+
$this->assertInternalType('string', $this->model->getOptionText($existValue));
7878
}
7979

8080
/**

dev/tests/unit/testsuite/Magento/Cms/Block/Adminhtml/Block/EditTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public function testGetHeaderText($modelBlockId)
8484
->with($title)
8585
->willReturn($escapedTitle);
8686

87-
$this->assertInstanceOf('Magento\Framework\Phrase', $this->this->getHeaderText());
87+
$this->assertInternalType('string', $this->this->getHeaderText());
8888
}
8989

9090
public function getHeaderTextDataProvider()

dev/tests/unit/testsuite/Magento/Customer/Controller/Account/ConfirmTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
class ConfirmTest extends \PHPUnit_Framework_TestCase
2020
{
2121
/**
22-
* @var \Magento\Customer\Controller\Account
22+
* @var \Magento\Customer\Controller\Account\Confirm
2323
*/
2424
protected $model;
2525

@@ -388,12 +388,12 @@ public function testSuccessRedirect(
388388
->with($this->equalTo('*/*/index'), ['_secure' => true])
389389
->will($this->returnValue($successUrl));
390390

391-
$this->redirectMock->expects($this->never())
391+
$this->redirectMock->expects($this->once())
392392
->method('success')
393393
->with($this->equalTo($resultUrl))
394394
->will($this->returnValue($resultUrl));
395395

396-
$this->scopeConfigMock->expects($this->never())
396+
$this->scopeConfigMock->expects($this->once())
397397
->method('isSetFlag')
398398
->with(
399399
$this->equalTo(Url::XML_PATH_CUSTOMER_STARTUP_REDIRECT_TO_DASHBOARD),

0 commit comments

Comments
 (0)