Skip to content

Commit a819db5

Browse files
author
Robert He
committed
MAGETWO-69137: upgrading Magento2 Project PHPUnit version to latest
- changed unit tests to support PHPUnit 6.2
1 parent a8f4a79 commit a819db5

File tree

4 files changed

+6
-7
lines changed

4 files changed

+6
-7
lines changed

app/code/Magento/AdvancedPricingImportExport/Test/Unit/Model/Import/AdvancedPricing/Validator/WebsiteTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class WebsiteTest extends \PHPUnit\Framework\TestCase
2727

2828
protected function setUp()
2929
{
30-
$this->webSiteModel = $this->getMockBuilder('Magento\Store\Model\WebSite')
30+
$this->webSiteModel = $this->getMockBuilder(\Magento\Store\Model\WebSite::class)
3131
->setMethods(['getBaseCurrency'])
3232
->disableOriginalConstructor()
3333
->getMock();

app/code/Magento/Email/Test/Unit/Block/Adminhtml/Template/EditTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ protected function setUp()
6666
['getFilesystem', '__wakeup', 'getPath', 'getDirectoryRead']
6767
);
6868

69-
$viewFilesystem = $this->getMockBuilder('Magento\Framework\View\Filesystem')
69+
$viewFilesystem = $this->getMockBuilder(\Magento\Framework\View\Filesystem::class)
7070
->setMethods(['getTemplateFileName'])
7171
->disableOriginalConstructor()
7272
->getMock();

dev/tests/integration/testsuite/Magento/Customer/Controller/Adminhtml/IndexTest.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -762,10 +762,9 @@ protected function prepareEmailMock($occurrenceNumber, $templateId, $sender, $cu
762762
$storeId = $customer->getStoreId();
763763
$name = $this->customerViewHelper->getCustomerName($customer);
764764

765-
$transportMock = $this->createPartialMock(
766-
\Magento\Framework\Mail\TransportInterface::class,
767-
['sendMessage']
768-
);
765+
$transportMock = $this->getMockBuilder(\Magento\Framework\Mail\TransportInterface::class)
766+
->setMethods(['sendMessage'])
767+
->getMockForAbstractClass();
769768
$transportMock->expects($this->exactly($occurrenceNumber))
770769
->method('sendMessage');
771770
$transportBuilderMock = $this->getMockBuilder(\Magento\Framework\Mail\Template\TransportBuilder::class)

dev/tests/integration/testsuite/Magento/Setup/Console/Command/DeployStaticContentCommandTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
/**
2424
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
2525
*/
26-
class DeployStaticContentCommandTest extends \PHPUnit_Framework_TestCase
26+
class DeployStaticContentCommandTest extends \PHPUnit\Framework\TestCase
2727
{
2828
/**
2929
* @var ObjectManagerInterface

0 commit comments

Comments
 (0)