Skip to content

Commit

Permalink
More test tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
Camwyn committed Jan 15, 2024
1 parent 5bc79a2 commit 807bcdc
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions tests/acceptance/LocalizeJSCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public function immediate_localize_should_append( AcceptanceTester $I ) {
Assert::assertContains( 'black', $contents );
}

public function immediate_localize_should_overwrite_with_force( AcceptanceTester $I ) {
public function it_should_overwrite_localize_with_force( AcceptanceTester $I ) {
$code = file_get_contents( codecept_data_dir( 'enqueue-template.php' ) );
$code .= <<<PHP
add_action( 'wp_enqueue_scripts', function() {
Expand Down Expand Up @@ -110,10 +110,10 @@ public function immediate_localize_should_overwrite_with_force( AcceptanceTester
Assert::assertContains( 'var animal', $contents );
Assert::assertContains( 'var color', $contents );
Assert::assertContains( 'brown', $contents );
Assert::assertContains( 'black', $contents );
Assert::assertNotContains( 'black', $contents );
}

public function it_should_append_to_localize_with_same_handle() {
public function it_should_append_to_localize_with_same_handle( AcceptanceTester $I ) {
$code_base = file_get_contents( codecept_data_dir( 'enqueue-template.php' ) );
$code = $code_base . <<<PHP
add_action( 'wp_enqueue_scripts', function() {
Expand Down Expand Up @@ -156,8 +156,4 @@ public function it_should_append_to_localize_with_same_handle() {
Assert::assertContains( 'cow', $contents );
Assert::assertContains( 'sheep', $contents );
}

public function it_should_not_append_to_localize_when_forced() {

}
}

0 comments on commit 807bcdc

Please sign in to comment.