Skip to content
This repository was archived by the owner on Apr 29, 2019. It is now read-only.

Upgrade phpunit to 7.X #125

Open
wants to merge 12 commits into
base: 2.3-develop
Choose a base branch
from
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ protected function setUp()
* @dataProvider errorDataProvider
* @param string $reportName
* @param array $result
* @param \PHPUnit_Framework_MockObject_Stub $queryReturnStub
* @param \PHPUnit\Framework\MockObject\Stub $queryReturnStub
*/
public function testValidate($reportName, $result, \PHPUnit_Framework_MockObject_Stub $queryReturnStub)
public function testValidate($reportName, $result, \PHPUnit\Framework\MockObject\Stub $queryReturnStub)
{
$connectionName = 'testConnection';
$this->queryFactoryMock->expects($this->once())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,15 @@ protected function setUp()

/**
* @param bool $hasBackendModel
* @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $expectsGetBackendModel
* @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $expectsCreate
* @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $expectsGetValue
* @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $expectsSetPath
* @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $expectsSetScope
* @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $expectsSetScopeId
* @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $expectsSetValue
* @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $expectsAfterLoad
* @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $expectsSerialize
* @param \PHPUnit\Framework\MockObject\Matcher\InvokedCount $expectsGetBackendModel
* @param \PHPUnit\Framework\MockObject\Matcher\InvokedCount $expectsCreate
* @param \PHPUnit\Framework\MockObject\Matcher\InvokedCount $expectsGetValue
* @param \PHPUnit\Framework\MockObject\Matcher\InvokedCount $expectsSetPath
* @param \PHPUnit\Framework\MockObject\Matcher\InvokedCount $expectsSetScope
* @param \PHPUnit\Framework\MockObject\Matcher\InvokedCount $expectsSetScopeId
* @param \PHPUnit\Framework\MockObject\Matcher\InvokedCount $expectsSetValue
* @param \PHPUnit\Framework\MockObject\Matcher\InvokedCount $expectsAfterLoad
* @param \PHPUnit\Framework\MockObject\Matcher\InvokedCount $expectsSerialize
* @param string $expectsValue
* @param string $className
* @param string $value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ public function testException()
}

/**
* @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $firstExpects
* @param \PHPUnit\Framework\MockObject\Matcher\InvokedCount $firstExpects
* @param bool $firstResult
* @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $secondExpects
* @param \PHPUnit\Framework\MockObject\Matcher\InvokedCount $secondExpects
* @param bool $secondResult
* @param bool $expectedResult
* @dataProvider visibilityDataProvider
Expand All @@ -74,9 +74,9 @@ public function testDisabled($firstExpects, $firstResult, $secondExpects, $secon
}

/**
* @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $firstExpects
* @param \PHPUnit\Framework\MockObject\Matcher\InvokedCount $firstExpects
* @param bool $firstResult
* @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $secondExpects
* @param \PHPUnit\Framework\MockObject\Matcher\InvokedCount $secondExpects
* @param bool $secondResult
* @param bool $expectedResult
* @dataProvider visibilityDataProvider
Expand Down
4 changes: 2 additions & 2 deletions app/code/Magento/Dhl/Test/Unit/Model/CarrierTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -366,8 +366,8 @@ public function testCollectRatesFail()

$request = new RateRequest();
$request->setPackageWeight(1);

$this->assertFalse(false, $this->model->collectRates($request));
$this->assertTrue($this->model->collectRates($request)->getError());
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ protected function setUp()
/**
* @param int|null $id
* @param string $typeId
* @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $expectedGetTitle
* @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $expectedGetValue
* @param \PHPUnit\Framework\MockObject\Matcher\InvokedCount $expectedGetTitle
* @param \PHPUnit\Framework\MockObject\Matcher\InvokedCount $expectedGetValue
* @return void
* @dataProvider getLinksTitleDataProvider
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ public function testCheckIsLive()
* @param int $useAggregatedData
* @param string $mainTable
* @param int $isFilter
* @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $getIfNullSqlResult
* @param \PHPUnit\Framework\MockObject\Matcher\InvokedCount $getIfNullSqlResult
* @dataProvider useAggregatedDataDataProvider
* @return void
*/
Expand Down Expand Up @@ -309,7 +309,7 @@ public function testAddItemCountExpr()
* @param int $isFilter
* @param int $useAggregatedData
* @param string $mainTable
* @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $getIfNullSqlResult
* @param \PHPUnit\Framework\MockObject\Matcher\InvokedCount $getIfNullSqlResult
* @dataProvider totalsDataProvider
* @return void
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,8 @@ function ($arg) {
/**
* @param mixed $from
* @param mixed $to
* @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $truncateCount
* @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $deleteCount
* @param \PHPUnit\Framework\MockObject\Matcher\InvokedCount $truncateCount
* @param \PHPUnit\Framework\MockObject\Matcher\InvokedCount $deleteCount
* @dataProvider intervalsDataProvider
* @return void
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,8 @@ public function stepIdentityContainerInit($identityMockClassName)
}

protected function stepSend(
\PHPUnit_Framework_MockObject_Matcher_InvokedCount $sendExpects,
\PHPUnit_Framework_MockObject_Matcher_InvokedCount $sendCopyToExpects
\PHPUnit\Framework\MockObject\Matcher\InvokedCount $sendExpects,
\PHPUnit\Framework\MockObject\Matcher\InvokedCount $sendCopyToExpects
) {
$senderMock = $this->createPartialMock(\Magento\Sales\Model\Order\Email\Sender::class, ['send', 'sendCopyTo']);
$senderMock->expects($sendExpects)
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@
"lusitanian/oauth": "~0.8.10",
"pdepend/pdepend": "2.5.2",
"phpmd/phpmd": "@stable",
"phpunit/phpunit": "~6.2.0",
"sebastian/phpcpd": "~3.0.0",
"phpunit/phpunit": "~7.1.0",
"sebastian/phpcpd": "~4.0.0",
"squizlabs/php_codesniffer": "3.2.2"
},
"replace": {
Expand Down
Loading