Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update REST API Controller PHPUnit tests #50120

Merged
merged 1 commit into from
Apr 27, 2023
Merged
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
56 changes: 32 additions & 24 deletions phpunit/class-gutenberg-rest-templates-controller-test.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,35 +62,43 @@ public function test_get_template_fallback() {
$this->assertSame( 'index', $response->get_data()['slug'], 'Should fallback to `index.html`.' );
}

public function test_context_param() {
$this->markTestIncomplete();
}
/**
* @doesNotPerformAssertions
*/
public function test_context_param() {}

public function test_get_items() {
$this->markTestIncomplete();
}
/**
* @doesNotPerformAssertions
*/
public function test_get_items() {}

public function test_get_item() {
$this->markTestIncomplete();
}
/**
* @doesNotPerformAssertions
*/
public function test_get_item() {}

public function test_create_item() {
$this->markTestIncomplete();
}
/**
* @doesNotPerformAssertions
*/
public function test_create_item() {}

public function test_update_item() {
$this->markTestIncomplete();
}
/**
* @doesNotPerformAssertions
*/
public function test_update_item() {}

public function test_delete_item() {
$this->markTestIncomplete();
}
/**
* @doesNotPerformAssertions
*/
public function test_delete_item() {}

public function test_prepare_item() {
$this->markTestIncomplete();
}
/**
* @doesNotPerformAssertions
*/
public function test_prepare_item() {}

public function test_get_item_schema() {
$this->markTestIncomplete();
}
/**
* @doesNotPerformAssertions
*/
public function test_get_item_schema() {}
}
48 changes: 27 additions & 21 deletions phpunit/class-wp-rest-block-pattern-categories-controller-test.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,32 +80,38 @@ public function test_get_items() {

/**
* Abstract methods that we must implement.
*
* @doesNotPerformAssertions
*/
public function test_context_param() {
$this->markTestIncomplete();
}
public function test_context_param() {}

public function test_get_item() {
$this->markTestIncomplete();
}
/**
* @doesNotPerformAssertions
*/
public function test_get_item() {}

public function test_create_item() {
$this->markTestIncomplete();
}
/**
* @doesNotPerformAssertions
*/
public function test_create_item() {}

public function test_update_item() {
$this->markTestIncomplete();
}
/**
* @doesNotPerformAssertions
*/
public function test_update_item() {}

public function test_delete_item() {
$this->markTestIncomplete();
}
/**
* @doesNotPerformAssertions
*/
public function test_delete_item() {}

public function test_prepare_item() {
$this->markTestIncomplete();
}
/**
* @doesNotPerformAssertions
*/
public function test_prepare_item() {}

public function test_get_item_schema() {
$this->markTestIncomplete();
}
/**
* @doesNotPerformAssertions
*/
public function test_get_item_schema() {}
}
70 changes: 43 additions & 27 deletions phpunit/class-wp-test-rest-users-controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,34 +156,50 @@ public function set_up() {
/**
* The following methods are implemented in core and tested.
* We need to define them here because they exist in the abstract parent.
*
* @doesNotPerformAssertions
*/
public function test_register_routes() {
$this->markTestIncomplete();
}
public function test_context_param() {
$this->markTestIncomplete();
}
public function test_get_item() {
$this->markTestIncomplete();
}
public function test_prepare_item() {
$this->markTestIncomplete();
}
public function test_create_item() {
$this->markTestIncomplete();
}
public function test_update_item() {
$this->markTestIncomplete();
}
public function test_delete_item() {
$this->markTestIncomplete();
}
public function test_get_items() {
$this->markTestIncomplete();
}
public function test_get_item_schema() {
$this->markTestIncomplete();
}
public function test_register_routes() {}

/**
* @doesNotPerformAssertions
*/
public function test_context_param() {}

/**
* @doesNotPerformAssertions
*/
public function test_get_item() {}

/**
* @doesNotPerformAssertions
*/
public function test_prepare_item() {}

/**
* @doesNotPerformAssertions
*/
public function test_create_item() {}

/**
* @doesNotPerformAssertions
*/
public function test_update_item() {}

/**
* @doesNotPerformAssertions
*/
public function test_delete_item() {}

/**
* @doesNotPerformAssertions
*/
public function test_get_items() {}

/**
* @doesNotPerformAssertions
*/
public function test_get_item_schema() {}

public function test_registered_query_params() {
$request = new WP_REST_Request( 'OPTIONS', '/wp/v2/users' );
Expand Down