Skip to content

Commit 5d087f2

Browse files
ShradddhaShradddha
authored andcommitted
AC-12092:: Remove Deprecations- PhpUnit10 Unit Tests
1 parent 170ec99 commit 5d087f2

File tree

3 files changed

+15
-5
lines changed

3 files changed

+15
-5
lines changed

app/code/Magento/CustomerImportExport/Test/Unit/Model/Import/CustomerCompositeTest.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@
2121
use Magento\Framework\Filesystem\Directory\Write;
2222
use Magento\Framework\Filesystem\Driver\File;
2323
use Magento\Framework\Filesystem\File\Read;
24+
use Magento\Framework\Serialize\Serializer\Json;
2425
use Magento\Framework\Stdlib\StringUtils;
26+
use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;
2527
use Magento\Framework\Translate\InlineInterface;
2628
use Magento\ImportExport\Model\Import;
2729
use Magento\ImportExport\Model\Import\AbstractSource;
@@ -177,6 +179,14 @@ protected function setUp(): void
177179
*/
178180
protected function _createModelMock($data)
179181
{
182+
$objectManager = new ObjectManager($this);
183+
$objects = [
184+
[
185+
Json::class,
186+
$this->createMock(Json::class)
187+
]
188+
];
189+
$objectManager->prepareObjectManager($objects);
180190
return new CustomerComposite(
181191
$this->_string,
182192
$this->_scopeConfigMock,

app/code/Magento/Translation/Test/Unit/Model/Json/PreProcessorTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,17 +152,17 @@ public static function processDataProvider()
152152
'area_code' => FrontNameResolver::AREA_CODE
153153
],
154154
[
155-
'areaList_getArea' => $this->never(),
156-
'area_load' => $this->never(),
155+
'areaList_getArea' => self::never(),
156+
'area_load' => self::never(),
157157
]
158158
],
159159
[
160160
[
161161
'area_code' => 'frontend'
162162
],
163163
[
164-
'areaList_getArea' => $this->once(),
165-
'area_load' => $this->once(),
164+
'areaList_getArea' => self::once(),
165+
'area_load' => self::once(),
166166
]
167167
],
168168
];

app/code/Magento/Vault/Test/Unit/Plugin/PaymentVaultConfigurationProcessTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ public function testBeforeProcess($jsLayout, $activeVaultList, $activePaymentLis
115115
*
116116
* @return array
117117
*/
118-
public static function beforeProcessDataProvider()
118+
public function beforeProcessDataProvider()
119119
{
120120
$jsLayout['components']['checkout']['children']['steps']['children']['billing-step']
121121
['children']['payment']['children']['renders']['children'] = [

0 commit comments

Comments
 (0)