More test coverage of FormGenerator

This commit is contained in:
Timothy Warren 2020-03-12 12:47:02 -04:00
parent 39f23c2c35
commit c60b821bca
20 changed files with 54 additions and 43 deletions

View File

@ -59,7 +59,7 @@ final class FormGenerator {
if ($display === FALSE) if ($display === FALSE)
{ {
return $this->helper->input([ return (string)$this->helper->input([
'type' => 'hidden', 'type' => 'hidden',
'name' => $name, 'name' => $name,
'value' => $value, 'value' => $value,

View File

@ -68,6 +68,13 @@ const SETTINGS_MAP = [
'description' => 'Token to refresh the access token before it expires', 'description' => 'Token to refresh the access token before it expires',
'readonly' => TRUE, 'readonly' => TRUE,
], ],
'special_hidden_flag' => [
'type' => 'string',
'title' => '',
'display' => FALSE,
'description' => '',
'value' => 'foo_bar',
]
], ],
'cache' => [ 'cache' => [

View File

@ -1,4 +1,4 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html><body> <html><body>
<input id="kitsu_username" type="text" name="kitsu_username" value=""> <input id="connection" type="text" name="connection" value="">
</body></html> </body></html>

View File

@ -1,4 +1,4 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html><body> <html><body>
<input id="whose_list" type="text" name="whose_list" value=""> <input id="kitsu_username" type="text" name="kitsu_username" value="">
</body></html> </body></html>

View File

@ -1,8 +1,4 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html><body> <html><body>
<select id="theme" name="theme"> <input id="whose_list" type="text" name="whose_list" value="">
<option value="auto">Automatically match OS theme</option>
<option value="light">Original Light Theme</option>
<option value="dark">Dark Theme</option>
</select>
</body></html> </body></html>

View File

@ -1,5 +1,8 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html><body> <html><body>
<label><input type="radio" name="show_anime_collection" value="1"> Yes</label> <select id="theme" name="theme">
<label><input type="radio" name="show_anime_collection" value="0" checked> No</label> <option value="auto">Automatically match OS theme</option>
<option value="light">Original Light Theme</option>
<option value="dark">Dark Theme</option>
</select>
</body></html> </body></html>

View File

@ -1,5 +1,5 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html><body> <html><body>
<label><input type="radio" name="show_manga_collection" value="1"> Yes</label> <label><input type="radio" name="show_anime_collection" value="1"> Yes</label>
<label><input type="radio" name="show_manga_collection" value="0" checked> No</label> <label><input type="radio" name="show_anime_collection" value="0" checked> No</label>
</body></html> </body></html>

View File

@ -1,7 +1,5 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html><body> <html><body>
<select id="default_list" name="default_list"> <label><input type="radio" name="show_manga_collection" value="1"> Yes</label>
<option value="anime">Anime</option> <label><input type="radio" name="show_manga_collection" value="0" checked> No</label>
<option value="manga">Manga</option>
</select>
</body></html> </body></html>

View File

@ -1,11 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html><body> <html><body>
<select id="default_anime_list_path" name="default_anime_list_path"> <select id="default_list" name="default_list">
<option value="watching">Watching</option> <option value="anime">Anime</option>
<option value="plan_to_watch">Plan to Watch</option> <option value="manga">Manga</option>
<option value="on_hold">On Hold</option>
<option value="dropped">Dropped</option>
<option value="completed">Completed</option>
<option value="all">All</option>
</select> </select>
</body></html> </body></html>

View File

@ -1,8 +1,8 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html><body> <html><body>
<select id="default_manga_list_path" name="default_manga_list_path"> <select id="default_anime_list_path" name="default_anime_list_path">
<option value="reading">Reading</option> <option value="watching">Watching</option>
<option value="plan_to_read">Plan to Read</option> <option value="plan_to_watch">Plan to Watch</option>
<option value="on_hold">On Hold</option> <option value="on_hold">On Hold</option>
<option value="dropped">Dropped</option> <option value="dropped">Dropped</option>
<option value="completed">Completed</option> <option value="completed">Completed</option>

View File

@ -1,8 +1,11 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html><body> <html><body>
<select id="type" name="type"> <select id="default_manga_list_path" name="default_manga_list_path">
<option value="mysql">MySQL</option> <option value="reading">Reading</option>
<option value="pgsql">PostgreSQL</option> <option value="plan_to_read">Plan to Read</option>
<option value="sqlite">SQLite</option> <option value="on_hold">On Hold</option>
<option value="dropped">Dropped</option>
<option value="completed">Completed</option>
<option value="all">All</option>
</select> </select>
</body></html> </body></html>

View File

@ -1,4 +1,8 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html><body> <html><body>
<input id="host" type="text" name="host" value=""> <select id="type" name="type">
<option value="mysql">MySQL</option>
<option value="pgsql">PostgreSQL</option>
<option value="sqlite">SQLite</option>
</select>
</body></html> </body></html>

View File

@ -1,4 +1,4 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html><body> <html><body>
<input id="user" type="text" name="user" value=""> <input id="host" type="text" name="host" value="">
</body></html> </body></html>

View File

@ -1,4 +1,4 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html><body> <html><body>
<input id="pass" type="text" name="pass" value=""> <input id="user" type="text" name="user" value="">
</body></html> </body></html>

View File

@ -1,4 +1,4 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html><body> <html><body>
<input id="port" type="text" name="port" value=""> <input id="pass" type="text" name="pass" value="">
</body></html> </body></html>

View File

@ -1,4 +1,4 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html><body> <html><body>
<input id="database" type="text" name="database" value=""> <input id="port" type="text" name="port" value="">
</body></html> </body></html>

View File

@ -1,4 +1,4 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html><body> <html><body>
<input id="file" type="text" name="file" value=""> <input id="database" type="text" name="database" value="">
</body></html> </body></html>

View File

@ -0,0 +1,4 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html><body>
<input id="file" type="text" name="file" value="">
</body></html>

View File

@ -1,9 +1,4 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html><body> <html><body>
<select id="driver" name="driver"> <input type="hidden" name="special_hidden_flag" value="foo_bar">
<option value="apcu">APCu</option>
<option value="memcached">Memcached</option>
<option value="redis">Redis</option>
<option value="null">No Cache</option>
</select>
</body></html> </body></html>

View File

@ -1,4 +1,9 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html><body> <html><body>
<input id="connection" type="text" name="connection" value=""> <select id="driver" name="driver">
<option value="apcu">APCu</option>
<option value="memcached">Memcached</option>
<option value="redis">Redis</option>
<option value="null">No Cache</option>
</select>
</body></html> </body></html>