2016-03-07 16:46:58 +00:00
|
|
|
<?php
|
|
|
|
namespace WooCommerce\Tests\API;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Settings API Tests
|
|
|
|
* @package WooCommerce\Tests\API
|
2016-03-07 18:24:03 +00:00
|
|
|
* @since 2.7.0
|
2016-03-07 16:46:58 +00:00
|
|
|
*/
|
2016-03-07 18:24:03 +00:00
|
|
|
class Settings extends \WP_Test_REST_Controller_Testcase {
|
|
|
|
|
|
|
|
public function setUp() {
|
|
|
|
parent::setUp();
|
|
|
|
$this->endpoint = new \WC_Rest_Settings_Controller();
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Test route registration.
|
|
|
|
* @since 2.7.0
|
|
|
|
*/
|
|
|
|
public function test_register_routes() {
|
|
|
|
$routes = $this->server->get_routes();
|
|
|
|
$this->assertArrayHasKey( '/wc/v1/settings/locations', $routes );
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2016-03-07 20:44:07 +00:00
|
|
|
* Test getting all locations.
|
2016-03-07 18:24:03 +00:00
|
|
|
* @since 2.7.0
|
|
|
|
*/
|
2016-03-07 20:44:07 +00:00
|
|
|
public function test_get_locations() {
|
2016-03-07 18:24:03 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Test /settings/locations without valid permissions/creds.
|
|
|
|
* @since 2.7.0
|
|
|
|
*/
|
|
|
|
public function test_get_locations_without_permission() {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Test /settings/locations correctly filters out bad values.
|
|
|
|
* Handles required fields and bogus fields.
|
|
|
|
* @since 2.7.0
|
|
|
|
*/
|
|
|
|
public function test_get_locations_filters_values() {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Test /settings/locations with type.
|
|
|
|
* @since 2.7.0
|
|
|
|
*/
|
|
|
|
public function test_get_locations_with_type() {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2016-03-07 20:44:07 +00:00
|
|
|
/**
|
|
|
|
* Test /settings/locations schema.
|
|
|
|
* @since 2.7.0
|
|
|
|
*/
|
|
|
|
public function test_get_item_schema() {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Test getting a single location item.
|
|
|
|
* @since 2.7.0
|
|
|
|
*/
|
|
|
|
public function test_get_location() {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Test getting a single location item.
|
|
|
|
* @since 2.7.0
|
|
|
|
*/
|
|
|
|
public function test_get_location_without_permission() {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
public function test_get_items() { }
|
2016-03-07 18:24:03 +00:00
|
|
|
public function test_get_item() { }
|
2016-03-07 20:44:07 +00:00
|
|
|
public function test_context_param() { }
|
2016-03-07 18:24:03 +00:00
|
|
|
public function test_create_item() { }
|
|
|
|
public function test_update_item() { }
|
|
|
|
public function test_delete_item() { }
|
|
|
|
public function test_prepare_item() { }
|
2016-03-07 16:46:58 +00:00
|
|
|
|
|
|
|
}
|