CashondeliveryTest.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\OfflinePayments\Test\Unit\Model;
  7. class CashondeliveryTest extends \PHPUnit\Framework\TestCase
  8. {
  9. /**
  10. * @var \Magento\OfflinePayments\Model\Cashondelivery
  11. */
  12. protected $_object;
  13. /**
  14. * @var \PHPUnit_Framework_MockObject_MockObject
  15. */
  16. protected $_scopeConfig;
  17. protected function setUp()
  18. {
  19. $helper = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
  20. $eventManager = $this->createMock(\Magento\Framework\Event\ManagerInterface::class);
  21. $paymentDataMock = $this->createMock(\Magento\Payment\Helper\Data::class);
  22. $this->_scopeConfig = $this->createMock(\Magento\Framework\App\Config\ScopeConfigInterface::class);
  23. $this->_object = $helper->getObject(
  24. \Magento\OfflinePayments\Model\Cashondelivery::class,
  25. [
  26. 'eventManager' => $eventManager,
  27. 'paymentData' => $paymentDataMock,
  28. 'scopeConfig' => $this->_scopeConfig,
  29. ]
  30. );
  31. }
  32. public function testGetInfoBlockType()
  33. {
  34. $this->assertEquals(\Magento\Payment\Block\Info\Instructions::class, $this->_object->getInfoBlockType());
  35. }
  36. }