Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
GridPerPageTest.php
Go to the documentation of this file.
1 <?php
7 
9 
10 class GridPerPageTest extends \PHPUnit\Framework\TestCase
11 {
15  private $model;
16 
17  protected function setUp()
18  {
19  $helper = new ObjectManager($this);
20  $this->model = $helper->getObject(
21  \Magento\Catalog\Model\Config\Source\GridPerPage::class,
22  ['perPageValues' => 'some,values']
23  );
24  }
25 
26  public function testToOptionalArray()
27  {
28  $expect = [
29  ['value' => 'some', 'label' => 'some'],
30  ['value' => 'values', 'label' => 'values'],
31  ];
32 
33  $this->assertEquals($expect, $this->model->toOptionArray());
34  }
35 }
$helper
Definition: iframe.phtml:13