<?php require_once '../../lib/StatesOptions.php'; $states_options = StatesOptions::getOptions(); $array = StatesOptions::getArray(); $pairs = StatesOptions::getPairs(); ?> <!DOCTYPE html> <html> <head> <title>States Parsing Class</title> <style type="text/css"> code{ display:block; padding:8px; margin: 5px 0; white-space:pre; border: solid 1px #CCC; background-color:#EEE; } </style> </head> <body> <h1>States Parsing Class</h1> <div> <h2>Options String</h2> <code><?php $states_options = StatesOptions::getOptions(); ?> <select name="states"> <?php echo $states_options; ?> </select></code> <label for="states">State:</label>
/** * Tests StatesOptions::getArray() */ public function testGetArray() { $states = StatesOptions::getArray(); $this->assertArrayHasKey('CA', $states, 'California is missing, states array faile dto load.'); }