Server : Apache System : Linux indy02.toastserver.com 3.10.0-962.3.2.lve1.5.85.el7.x86_64 #1 SMP Thu Apr 18 15:18:36 UTC 2024 x86_64 User : palandch ( 1163) PHP Version : 7.1.33 Disable Function : NONE Directory : /home/palandch/public_html/core/components/formit/test/Tests/Modules/ |
<?php /** * @package formit-test */ /** * Tests related to the FiStateOptions snippet * * @package formit-test * @group Modules * @group FiStateOptions */ class FiStateOptionsTest extends FiTestCase { /** * @var fiCountryOptions $module */ public $module; public function setUp() { parent::setUp(); $this->module = $this->formit->loadModule('fiStateOptions','stateOptions'); } public function tearDown() { $this->formit->stateOptions = null; parent::tearDown(); } /** * Ensure initialize sets up the default options * @return void */ public function testInitialize() { $this->module->initialize(); $this->assertNotEmpty($this->module->config); $this->assertArrayHasKey('selectedKey',$this->module->config); } /** * Ensure getData loads the country list * @return void */ public function testGetData() { $data = $this->module->getData(); $this->assertNotEmpty($data); $this->assertArrayHasKey('TX',$data); } }