Skip to content

Commit

Permalink
Fix tests (to reference the right ID for tracking ratio)
Browse files Browse the repository at this point in the history
  • Loading branch information
mehigh committed Jun 26, 2024
1 parent afc3d1d commit 507a6dc
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/phpunit/class-test-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ public function test_settings_init__field_web_vitals_tracking_ratio() {
$this->assertSame( $field_name, $field['id'] );
$this->assertSame( 'Web Vitals Tracking Ratio', $field['title'] );

$this->assertSame( array( $this->settings->fields[5], 'render' ), $field['callback'] );
$this->assertSame( array( $this->settings->fields[2], 'render' ), $field['callback'] );

$this->assertSame(
array(
Expand Down Expand Up @@ -250,7 +250,7 @@ public function test_web_vitals_tracking_ratio_render__empty_options() {
$this->settings->settings_init();

ob_start();
$this->settings->fields[5]->render();
$this->settings->fields[2]->render();
$result = ob_get_contents();
ob_end_clean();

Expand All @@ -270,7 +270,7 @@ public function test_web_vitals_tracking_ratio_render__set_web_vitals_tracking_r
add_option( 'spt_settings', array( 'web_vitals_tracking_ratio' => 0.05 ) );

ob_start();
$this->settings->fields[5]->render();
$this->settings->fields[2]->render();
$result = ob_get_contents();
ob_end_clean();

Expand All @@ -291,7 +291,7 @@ public function test_web_vitals_tracking_ratio_render__theme_web_vitals_tracking
$this->settings->settings_init();

ob_start();
$this->settings->fields[5]->render();
$this->settings->fields[2]->render();
$result = ob_get_contents();
ob_end_clean();

Expand All @@ -318,7 +318,7 @@ function () {
);

ob_start();
$this->settings->fields[5]->render();
$this->settings->fields[2]->render();
$result = ob_get_contents();
ob_end_clean();

Expand Down

0 comments on commit 507a6dc

Please sign in to comment.