Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions tests/phpunit/tests/blocks/wpBlockType.php
Original file line number Diff line number Diff line change
Expand Up @@ -528,9 +528,9 @@ public function test_variations_callback_are_lazy_loaded() {
)
);

$this->assertSame( false, $callback_called, 'The callback should not be called before the variations are accessed.' );
$this->assertFalse( $callback_called, 'The callback should not be called before the variations are accessed.' );
$block_type->variations; // access the variations.
$this->assertSame( true, $callback_called, 'The callback should be called when the variations are accessed.' );
$this->assertTrue( $callback_called, 'The callback should be called when the variations are accessed.' );
}

/**
Expand All @@ -555,7 +555,7 @@ public function test_variations_precedence_over_callback_post_registration() {

// If the variations are defined after registration but before first access, the callback should not override it.
$this->assertSameSets( $test_variations, $block_type->get_variations(), 'Variations are same as variations set' );
$this->assertSame( false, $callback_called, 'The callback was never called.' );
$this->assertFalse( $callback_called, 'The callback was never called.' );
}

/**
Expand Down Expand Up @@ -617,7 +617,7 @@ public function test_get_block_type_variations_filter_with_variation_callback()

$obtained_variations = $block_type->variations; // access the variations.

$this->assertSame( true, $callback_called, 'The callback should be called when the variations are accessed.' );
$this->assertTrue( $callback_called, 'The callback should be called when the variations are accessed.' );
$this->assertSameSets( $obtained_variations, $expected_variations, 'The variations obtained from the callback should be filtered.' );
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ public function test_wp_bind_handles_nested_bindings() {
public function test_wp_bind_handles_true_value() {
$html = '<div data-wp-bind--id="myPlugin::state.trueValue"></div>';
list($p) = $this->process_directives( $html );
$this->assertSame( true, $p->get_attribute( 'id' ) );
$this->assertTrue( $p->get_attribute( 'id' ) );
}

/**
Expand All @@ -423,7 +423,7 @@ public function test_wp_bind_handles_true_value() {
public function test_wp_bind_ignores_unique_ids() {
$html = '<div data-wp-bind--id="myPlugin::state.trueValue"></div>';
list($p) = $this->process_directives( $html );
$this->assertSame( true, $p->get_attribute( 'id' ) );
$this->assertTrue( $p->get_attribute( 'id' ) );

$html = '<div data-wp-bind--id---unique-id="myPlugin::state.trueValue"></div>';
list($p) = $this->process_directives( $html );
Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/tests/rest-api/rest-post-meta-fields.php
Original file line number Diff line number Diff line change
Expand Up @@ -2348,7 +2348,7 @@ public function test_update_meta_with_unchanged_values_and_custom_authentication
$this->assertSame( 200, $response->get_status() );

$data = $response->get_data();
$this->assertSame( false, $data['meta']['authenticated'] );
$this->assertFalse( $data['meta']['authenticated'] );
}

/**
Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/tests/rest-api/wpRestMenusController.php
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ public function test_update_item() {
$data = $response->get_data();
$this->assertSame( 'New Name', $data['name'] );
$this->assertSame( 'New Description', $data['description'] );
$this->assertSame( true, $data['auto_add'] );
$this->assertTrue( $data['auto_add'] );
$this->assertSame( 'new-name', $data['slug'] );
$this->assertSame( 'just meta', $data['meta']['test_single_menu'] );
$this->assertFalse( isset( $data['meta']['test_cat_meta'] ) );
Expand Down
Loading