fix data struct for test api visibility

This commit is contained in:
vnmedeiros 2019-04-16 14:11:25 -03:00
parent a02ac419a8
commit 2efe886739
1 changed files with 5 additions and 5 deletions

View File

@ -351,7 +351,7 @@ class TAINACAN_REST_Visibilility_Controller extends TAINACAN_UnitApiTestCase {
$status = $response->status;
$data = $response->get_data();
$this->assertEquals(200, $status);
$this->assertEquals(1, sizeof($data));
$this->assertEquals(1, sizeof($data['items']));
//tax public - context=edit:
$request_public_edit = new \WP_REST_Request(
@ -363,7 +363,7 @@ class TAINACAN_REST_Visibilility_Controller extends TAINACAN_UnitApiTestCase {
$status = $response->status;
$data = $response->get_data();
$this->assertEquals(200, $status);
$this->assertEquals(1, sizeof($data));
$this->assertEquals(1, sizeof($data['items']));
//tax private:
$request_private = new \WP_REST_Request(
@ -381,7 +381,7 @@ class TAINACAN_REST_Visibilility_Controller extends TAINACAN_UnitApiTestCase {
$status = $response->status;
$data = $response->get_data();
$this->assertEquals(200, $status);
$this->assertEquals(1, sizeof($data));
$this->assertEquals(1, sizeof($data['items']));
//tax private - context=edit:
$request_private_edit = new \WP_REST_Request(
@ -393,7 +393,7 @@ class TAINACAN_REST_Visibilility_Controller extends TAINACAN_UnitApiTestCase {
$status = $response->status;
$data = $response->get_data();
$this->assertEquals(200, $status);
$this->assertEquals(1, sizeof($data));
$this->assertEquals(1, sizeof($data['items']));
}
public function test_get_items_not_logged() {
@ -415,7 +415,7 @@ class TAINACAN_REST_Visibilility_Controller extends TAINACAN_UnitApiTestCase {
$status = $response->status;
$data = $response->get_data();
$this->assertEquals(200, $status);
$this->assertEquals(1, sizeof($data));
$this->assertEquals(1, sizeof($data['items']));
//tax public - context=edit:
$request_public_edit = new \WP_REST_Request(