Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
CashondeliveryTest.php
Go to the documentation of this file.
1 <?php
7 
8 class CashondeliveryTest extends \PHPUnit\Framework\TestCase
9 {
13  protected $_object;
14 
18  protected $_scopeConfig;
19 
20  protected function setUp()
21  {
22  $helper = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
23 
24  $eventManager = $this->createMock(\Magento\Framework\Event\ManagerInterface::class);
25  $paymentDataMock = $this->createMock(\Magento\Payment\Helper\Data::class);
26 
27  $this->_scopeConfig = $this->createMock(\Magento\Framework\App\Config\ScopeConfigInterface::class);
28  $this->_object = $helper->getObject(
29  \Magento\OfflinePayments\Model\Cashondelivery::class,
30  [
31  'eventManager' => $eventManager,
32  'paymentData' => $paymentDataMock,
33  'scopeConfig' => $this->_scopeConfig,
34  ]
35  );
36  }
37 
38  public function testGetInfoBlockType()
39  {
40  $this->assertEquals(\Magento\Payment\Block\Info\Instructions::class, $this->_object->getInfoBlockType());
41  }
42 }
$helper
Definition: iframe.phtml:13