Skip to content

Commit 16b58bc

Browse files
#27500 - Added strict types and fix identation.
1 parent 5f6b272 commit 16b58bc

File tree

9 files changed

+28
-12
lines changed

9 files changed

+28
-12
lines changed

app/code/Magento/OfflinePayments/Test/Unit/Block/Form/AbstractInstructionTest.php

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,34 +3,41 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
declare(strict_types=1);
7+
68
namespace Magento\OfflinePayments\Test\Unit\Block\Form;
79

8-
class AbstractInstructionTest extends \PHPUnit\Framework\TestCase
10+
use Magento\Framework\View\Element\Template\Context;
11+
use Magento\OfflinePayments\Block\Form\AbstractInstruction;
12+
use Magento\Payment\Model\MethodInterface;
13+
use PHPUnit\Framework\TestCase;
14+
15+
class AbstractInstructionTest extends TestCase
916
{
1017
/**
11-
* @var \Magento\OfflinePayments\Block\Form\AbstractInstruction
18+
* @var AbstractInstruction
1219
*/
13-
protected $_model;
20+
protected $model;
1421

1522
protected function setUp()
1623
{
17-
$context = $this->createMock(\Magento\Framework\View\Element\Template\Context::class);
18-
$this->_model = $this->getMockForAbstractClass(
19-
\Magento\OfflinePayments\Block\Form\AbstractInstruction::class,
24+
$context = $this->createMock(Context::class);
25+
$this->model = $this->getMockForAbstractClass(
26+
AbstractInstruction::class,
2027
['context' => $context]
2128
);
2229
}
2330

2431
public function testGetInstructions()
2532
{
26-
$method = $this->getMockBuilder(\Magento\Payment\Model\MethodInterface::class)
33+
$method = $this->getMockBuilder(MethodInterface::class)
2734
->getMockForAbstractClass();
2835

2936
$method->expects($this->once())
3037
->method('getConfigData')
3138
->willReturn('instructions');
32-
$this->_model->setData('method', $method);
39+
$this->model->setData('method', $method);
3340

34-
$this->assertEquals('instructions', $this->_model->getInstructions());
41+
$this->assertEquals('instructions', $this->model->getInstructions());
3542
}
3643
}

app/code/Magento/OfflinePayments/Test/Unit/Block/Info/CheckmoTest.php

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

78
namespace Magento\OfflinePayments\Test\Unit\Block\Info;
89

@@ -46,7 +47,7 @@ protected function setUp()
4647
}
4748

4849
/**
49-
* @covers \Magento\OfflinePayments\Block\Info\Checkmo::getPayableTo
50+
* @covers \Magento\OfflinePayments\Block\Info\Checkmo::getPayableTo
5051
* @param array $details
5152
* @param string|null $expected
5253
* @dataProvider getPayableToDataProvider
@@ -75,7 +76,7 @@ public function getPayableToDataProvider()
7576
}
7677

7778
/**
78-
* @covers \Magento\OfflinePayments\Block\Info\Checkmo::getMailingAddress
79+
* @covers \Magento\OfflinePayments\Block\Info\Checkmo::getMailingAddress
7980
* @param array $details
8081
* @param string|null $expected
8182
* @dataProvider getMailingAddressDataProvider

app/code/Magento/OfflinePayments/Test/Unit/Model/BanktransferTest.php

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

78
namespace Magento\OfflinePayments\Test\Unit\Model;
89

app/code/Magento/OfflinePayments/Test/Unit/Model/CashondeliveryTest.php

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

78
namespace Magento\OfflinePayments\Test\Unit\Model;
89

app/code/Magento/OfflinePayments/Test/Unit/Model/CheckmoConfigProviderTest.php

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

78
namespace Magento\OfflinePayments\Test\Unit\Model;
89

app/code/Magento/OfflinePayments/Test/Unit/Model/CheckmoTest.php

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

78
namespace Magento\OfflinePayments\Test\Unit\Model;
89

app/code/Magento/OfflinePayments/Test/Unit/Model/InstructionsConfigProviderTest.php

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

78
namespace Magento\OfflinePayments\Test\Unit\Model;
89

app/code/Magento/OfflinePayments/Test/Unit/Model/PurchaseorderTest.php

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

78
namespace Magento\OfflinePayments\Test\Unit\Model;
89

app/code/Magento/OfflinePayments/Test/Unit/Observer/BeforeOrderPaymentSaveObserverTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
declare(strict_types=1);
7+
68
namespace Magento\OfflinePayments\Test\Unit\Observer;
79

810
use Magento\Framework\Event;
@@ -18,7 +20,7 @@
1820
use PHPUnit\Framework\TestCase;
1921

2022
/**
21-
* Test class for \Magento\OfflinePayments\Observer\BeforeOrderPaymentSaveObserver
23+
* @covers \Magento\OfflinePayments\Observer\BeforeOrderPaymentSaveObserver
2224
*/
2325
class BeforeOrderPaymentSaveObserverTest extends TestCase
2426
{

0 commit comments

Comments
 (0)