Tiny lints

This commit is contained in:
Rodrigo de Oliveira 2021-04-18 13:24:30 -03:00
parent faa6783af0
commit 73d0fe5e10
4 changed files with 6 additions and 25 deletions

View File

@ -536,5 +536,3 @@ class TAINACAN_REST_Exposers extends TAINACAN_UnitApiTestCase {
} */// TODO automate test this } */// TODO automate test this
} }
?>

View File

@ -7,10 +7,8 @@ namespace Tainacan\Tests;
*/ */
class TAINACAN_REST_Importers_Controller extends TAINACAN_UnitApiTestCase { class TAINACAN_REST_Importers_Controller extends TAINACAN_UnitApiTestCase {
public function test_create(){ public function test_create() {
$params = json_encode([ $params = json_encode([ 'importer_slug' => 'csv' ]);
'importer_slug' => 'csv'
]);
$request = new \WP_REST_Request('POST', $this->namespace . '/importers/session'); $request = new \WP_REST_Request('POST', $this->namespace . '/importers/session');
$request->set_body($params); $request->set_body($params);
@ -55,5 +53,3 @@ class TAINACAN_REST_Importers_Controller extends TAINACAN_UnitApiTestCase {
} }
} }
?>

View File

@ -3,17 +3,16 @@
namespace Tainacan\Tests; namespace Tainacan\Tests;
/** /**
* Class TestCollections * Class Taxonomies
* *
* @package Test_Tainacan * @package Test_Tainacan
*/ */
/** /**
* Sample test case. * Taxonomies test case.
*/ */
class Taxonomies extends TAINACAN_UnitTestCase { class Taxonomies extends TAINACAN_UnitTestCase {
/** /**
* Teste da insercao de uma taxonomia simples * Teste da insercao de uma taxonomia simples
*/ */
@ -334,7 +333,6 @@ class Taxonomies extends TAINACAN_UnitTestCase {
} }
function test_brackets_2() { function test_brackets_2() {
$Tainacan_Item_Metadata = \Tainacan\Repositories\Item_Metadata::get_instance(); $Tainacan_Item_Metadata = \Tainacan\Repositories\Item_Metadata::get_instance();
$collection = $this->tainacan_entity_factory->create_entity( $collection = $this->tainacan_entity_factory->create_entity(
@ -411,9 +409,6 @@ class Taxonomies extends TAINACAN_UnitTestCase {
$itemMeta2_check = new \Tainacan\Entities\Item_Metadata_Entity($i2, $metadatum); $itemMeta2_check = new \Tainacan\Entities\Item_Metadata_Entity($i2, $metadatum);
$this->assertEquals('[Rock]', $itemMeta2_check->get_value()->get_name()); $this->assertEquals('[Rock]', $itemMeta2_check->get_value()->get_name());
} }
function test_metadata_taxonomy_term_count() { function test_metadata_taxonomy_term_count() {
@ -538,7 +533,6 @@ class Taxonomies extends TAINACAN_UnitTestCase {
$itemMeta1_repo->validate(); $itemMeta1_repo->validate();
$Tainacan_Item_Metadata->insert($itemMeta1_repo); $Tainacan_Item_Metadata->insert($itemMeta1_repo);
$i2 = $this->tainacan_entity_factory->create_entity( $i2 = $this->tainacan_entity_factory->create_entity(
'item', 'item',
array( array(
@ -587,8 +581,6 @@ class Taxonomies extends TAINACAN_UnitTestCase {
function test_term_taxonomy_filtered_by_collections() { function test_term_taxonomy_filtered_by_collections() {
$Tainacan_Taxonomies = \Tainacan\Repositories\Taxonomies::get_instance(); $Tainacan_Taxonomies = \Tainacan\Repositories\Taxonomies::get_instance();
$Tainacan_Terms = \Tainacan\Repositories\Terms::get_instance();
$Tainacan_Item_Metadata = \Tainacan\Repositories\Item_Metadata::get_instance();
$tax = $this->tainacan_entity_factory->create_entity( $tax = $this->tainacan_entity_factory->create_entity(
'taxonomy', 'taxonomy',
@ -704,7 +696,6 @@ class Taxonomies extends TAINACAN_UnitTestCase {
$response = $matches[3][0]; $response = $matches[3][0];
$this->assertEquals($response, $expected_response); $this->assertEquals($response, $expected_response);
$meta_query = [ $meta_query = [
'metaquery' => [ 'metaquery' => [
[ [

View File

@ -9,14 +9,11 @@ namespace Tainacan\Tests;
*/ */
/** /**
* Sample test case. * TestUtilities
*/ */
class TestUtilities extends TAINACAN_UnitTestCase { class TestUtilities extends TAINACAN_UnitTestCase {
function test_initials() { function test_initials() {
$string = 'Roberto Carlos'; $string = 'Roberto Carlos';
$this->assertEquals('RC', tainacan_get_initials($string)); $this->assertEquals('RC', tainacan_get_initials($string));
@ -42,7 +39,6 @@ class TestUtilities extends TAINACAN_UnitTestCase {
$string = ''; $string = '';
$this->assertEquals('', tainacan_get_initials($string)); $this->assertEquals('', tainacan_get_initials($string));
} }
function test_get_descendants_ids() { function test_get_descendants_ids() {