2017-12-04 18:42:41 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Tainacan\Tests;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Basic test case for api calls
|
2018-01-18 14:28:51 +00:00
|
|
|
* @author medialab
|
2017-12-04 18:42:41 +00:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
class TAINACAN_UnitApiTestCase extends TAINACAN_UnitTestCase {
|
|
|
|
/**
|
|
|
|
* Test REST Server
|
|
|
|
* @var \WP_REST_Server
|
|
|
|
*/
|
|
|
|
protected $server;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Default Tainacan Namespace
|
|
|
|
* @var string default '/tainacan/v2'
|
|
|
|
*/
|
2017-12-18 12:52:45 +00:00
|
|
|
protected $namespace = '/tainacan/v2';
|
|
|
|
|
2024-01-23 04:10:20 +00:00
|
|
|
public $collection;
|
|
|
|
public $metadatum;
|
|
|
|
public $item;
|
|
|
|
public $multiple_meta;
|
|
|
|
public $taxonomy;
|
|
|
|
public $category;
|
|
|
|
public $api_baseroute;
|
|
|
|
|
|
|
|
public function setUp() : void{
|
2017-12-04 18:42:41 +00:00
|
|
|
parent::setUp();
|
2017-12-18 12:52:45 +00:00
|
|
|
|
2017-12-04 18:42:41 +00:00
|
|
|
global $wp_rest_server;
|
|
|
|
$this->server = $wp_rest_server = new \WP_REST_Server;
|
2017-12-18 12:52:45 +00:00
|
|
|
|
2017-12-04 18:42:41 +00:00
|
|
|
do_action( 'rest_api_init' );
|
|
|
|
}
|
|
|
|
}
|