objectManager = new ObjectManager($this); $this->model = $this->objectManager->getObject(\Magento\Security\Model\Config\Source\ResetMethod::class); } public function testToOptionArray() { $expected = [ [ 'value' => \Magento\Security\Model\Config\Source\ResetMethod::OPTION_BY_IP_AND_EMAIL, 'label' => __('By IP and Email') ], [ 'value' => \Magento\Security\Model\Config\Source\ResetMethod::OPTION_BY_IP, 'label' => __('By IP') ], [ 'value' => \Magento\Security\Model\Config\Source\ResetMethod::OPTION_BY_EMAIL, 'label' => __('By Email') ], [ 'value' => \Magento\Security\Model\Config\Source\ResetMethod::OPTION_NONE, 'label' => __('None') ], ]; $this->assertEquals($expected, $this->model->toOptionArray()); } public function testToArray() { $expected = [ \Magento\Security\Model\Config\Source\ResetMethod::OPTION_BY_IP_AND_EMAIL => __('By IP and Email'), \Magento\Security\Model\Config\Source\ResetMethod::OPTION_BY_IP => __('By IP'), \Magento\Security\Model\Config\Source\ResetMethod::OPTION_BY_EMAIL => __('By Email'), \Magento\Security\Model\Config\Source\ResetMethod::OPTION_NONE => __('None'), ]; $this->assertEquals($expected, $this->model->toArray()); } }