Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
FlatrateTest.php
Go to the documentation of this file.
1 <?php
7 
8 class FlatrateTest extends \PHPUnit\Framework\TestCase
9 {
13  protected $model;
14 
15  protected function setUp()
16  {
17  $this->model = new \Magento\OfflineShipping\Model\Config\Source\Flatrate();
18  }
19 
20  public function testToOptionArray()
21  {
22  $expected = [
23  ['value' => '', 'label' => __('None')],
24  ['value' => 'O', 'label' => __('Per Order')],
25  ['value' => 'I', 'label' => __('Per Item')]
26  ];
27 
28  $this->assertEquals($expected, $this->model->toOptionArray());
29  }
30 }
__()
Definition: __.php:13