Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
ValueTypeTest.php
Go to the documentation of this file.
1 <?php
7 
8 class ValueTypeTest extends \PHPUnit\Framework\TestCase
9 {
13  protected $_model;
14 
15  protected function setUp()
16  {
17  $objectManager = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
18  $this->_model = $objectManager->getObject(\Magento\GoogleAdwords\Model\Config\Source\ValueType::class, []);
19  }
20 
21  public function testToOptionArray()
22  {
23  $this->assertEquals(
24  [
25  [
26  'value' => \Magento\GoogleAdwords\Helper\Data::CONVERSION_VALUE_TYPE_DYNAMIC,
27  'label' => 'Dynamic',
28  ],
29  [
30  'value' => \Magento\GoogleAdwords\Helper\Data::CONVERSION_VALUE_TYPE_CONSTANT,
31  'label' => 'Constant'
32  ],
33  ],
34  $this->_model->toOptionArray()
35  );
36  }
37 }
$objectManager
Definition: bootstrap.php:17