Skip to content

Commit 1375f48

Browse files
authored
Workflow updates
1 parent 7d52f4c commit 1375f48

File tree

3 files changed

+21
-4
lines changed

3 files changed

+21
-4
lines changed

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
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
}

tests/test-basic.php

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff 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
}

tests/test-optimizer.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,13 @@
1010
*/
1111
class 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
*/

0 commit comments

Comments
 (0)