File tree Expand file tree Collapse file tree 3 files changed +21
-4
lines changed
Expand file tree Collapse file tree 3 files changed +21
-4
lines changed Original file line number Diff line number Diff line change 2525 }
2626 },
2727 "scripts" : {
28- "test" : " phpunit" ,
29- "phpcs" : " phpcs --standard=WordPress" ,
30- "phpcbf" : " phpcbf --standard=WordPress"
28+ "test" : " vendor/bin/ phpunit" ,
29+ "phpcs" : " vendor/bin/ phpcs --standard=WordPress" ,
30+ "phpcbf" : " vendor/bin/ phpcbf --standard=WordPress"
3131 }
3232}
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ class BasicTest extends WP_UnitTestCase {
1414 * A basic test to ensure the plugin is loaded.
1515 */
1616 public function test_plugin_is_loaded () {
17- $ this ->assertTrue ( function_exists ( 'simple_wp_optimizer_init ' ) );
17+ $ this ->assertTrue ( function_exists ( 'es_optimizer_init_settings ' ) );
1818 }
1919
2020 /**
@@ -23,4 +23,14 @@ public function test_plugin_is_loaded() {
2323 public function test_testing_environment () {
2424 $ this ->assertTrue ( true );
2525 }
26+
27+ /**
28+ * Test that default options exist.
29+ */
30+ public function test_default_options_exist () {
31+ $ this ->assertTrue ( function_exists ( 'es_optimizer_get_default_options ' ) );
32+ $ defaults = es_optimizer_get_default_options ();
33+ $ this ->assertIsArray ( $ defaults );
34+ $ this ->assertArrayHasKey ( 'disable_emojis ' , $ defaults );
35+ }
2636}
Original file line number Diff line number Diff line change 1010 */
1111class OptimizerTest extends WP_UnitTestCase {
1212
13+ /**
14+ * Test plugin version constant is defined.
15+ */
16+ public function test_version_constant () {
17+ $ this ->assertTrue ( defined ( 'ES_WP_OPTIMIZER_VERSION ' ) );
18+ }
19+
1320 /**
1421 * Test optimizer functionality.
1522 */
You can’t perform that action at this time.
0 commit comments