@@ -29,7 +29,7 @@ public function test_init_tables() {
2929 * Test (sort of) table creation
3030 */
3131 public function test_create_tables () {
32-
32+
3333 /* The expected result has:
3434 * - success messages: the table are created with a "CREATE IF NOT EXISTS",
3535 * hence, will not be recreated once more, they're already created
@@ -41,7 +41,7 @@ public function test_create_tables() {
4141 * set of tables (with another prefix for instance).
4242 * Well. Consider this for next DB engine maybe? :)
4343 */
44-
44+
4545 $ expected = array (
4646 'success ' => array (
4747 "Table 'yourls_url' created. " ,
@@ -54,21 +54,21 @@ public function test_create_tables() {
5454 'Could not insert sample short URLs ' ,
5555 ),
5656 );
57-
57+
5858 $ this ->assertSame ( $ expected , yourls_create_sql_tables () );
5959 }
60-
60+
6161 /**
6262 * Test (sort of) defining constants
6363 */
6464 public function test_correct_config () {
6565 $ test = new \YOURLS \Config \Config (YOURLS_CONFIGFILE );
66-
66+
6767 // This should return a readable file
6868 $ readable = is_readable ($ test ->find_config (YOURLS_CONFIGFILE ));
6969 $ this ->assertTrue ($ readable );
7070 // For the record, $this->assertFileIsReadable() was introduced around PHPUnit 5.6
71-
71+
7272 // redefining YOURLS_ constants should not throw any error ("constant already defined...")
7373 // or define any new constants
7474 $ consts = get_defined_constants (true );
@@ -103,7 +103,7 @@ public function test_not_found_config() {
103103 */
104104 public function test_init_defaults () {
105105 $ test = new \YOURLS \Config \InitDefaults ();
106-
106+
107107 $ expected = array (
108108 'include_core_funcs ' => true ,
109109 'include_auth_funcs ' => false ,
@@ -116,6 +116,7 @@ public function test_init_defaults() {
116116 'include_db ' => true ,
117117 'include_cache ' => true ,
118118 'return_if_fast_init ' => true ,
119+ 'init_options ' => true ,
119120 'get_all_options ' => true ,
120121 'register_shutdown ' => true ,
121122 'core_loaded ' => true ,
@@ -126,10 +127,10 @@ public function test_init_defaults() {
126127 'check_new_version ' => true ,
127128 'init_admin ' => true ,
128129 );
129-
130+
130131 $ actual = get_class_vars (get_class ($ test ));
131-
132+
132133 $ this ->assertSame ($ expected , $ actual );
133134 }
134-
135+
135136}
0 commit comments