Skip to content

Commit 5b68364

Browse files
Changed according PHPUnit version.
1 parent a8d13e5 commit 5b68364

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

app/code/Magento/Catalog/Test/Unit/Cron/DeleteAbandonedStoreFlatTablesTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6-
declare(strict_types=1);
76

87
namespace Magento\Catalog\Test\Unit\Cron;
98

@@ -34,7 +33,7 @@ class AvailabilityCheckerTest extends \PHPUnit_Framework_TestCase
3433
*/
3534
protected function setUp()
3635
{
37-
$this->indexerMock = $this->createMock(Indexer::class);
36+
$this->indexerMock = $this->getMockBuilder(Indexer::class)->disableOriginalConstructor()->getMock();
3837
$this->deleteAbandonedStoreFlatTables = new DeleteAbandonedStoreFlatTables($this->indexerMock);
3938
}
4039

app/code/Magento/Catalog/Test/Unit/Cron/DeleteOutdatedPriceValuesTest.php

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6-
declare(strict_types=1);
76

87
namespace Magento\Catalog\Test\Unit\Cron;
98

@@ -66,12 +65,12 @@ class DeleteOutdatedPriceValuesTest extends \PHPUnit_Framework_TestCase
6665
*/
6766
protected function setUp()
6867
{
69-
$this->resourceConnectionMock = $this->createMock(ResourceConnection::class);
70-
$this->attributeRepositoryMock = $this->createMock(AttributeRepository::class);
71-
$this->attributeMock = $this->createMock(Attribute::class);
72-
$this->scopeConfigMock = $this->createMock(ScopeConfig::class);
73-
$this->dbAdapterMock = $this->createMock(AdapterInterface::class);
74-
$this->attributeBackendMock = $this->createMock(BackendInterface::class);
68+
$this->resourceConnectionMock = $this->getMockBuilder(ResourceConnection::class)->disableOriginalConstructor()->getMock();
69+
$this->attributeRepositoryMock = $this->getMockBuilder(AttributeRepository::class)->disableOriginalConstructor()->getMock();
70+
$this->attributeMock = $this->getMockBuilder(Attribute::class)->disableOriginalConstructor()->getMock();
71+
$this->scopeConfigMock = $this->getMockBuilder(ScopeConfig::class)->disableOriginalConstructor()->getMock();
72+
$this->dbAdapterMock = $this->getMockBuilder(AdapterInterface::class)->disableOriginalConstructor()->getMock();
73+
$this->attributeBackendMock = $this->getMockBuilder(BackendInterface::class)->disableOriginalConstructor()->getMock();
7574
$this->deleteOutdatedPriceValues = new DeleteOutdatedPriceValues(
7675
$this->resourceConnectionMock,
7776
$this->attributeRepositoryMock,

0 commit comments

Comments
 (0)