From c1fab38a0dc91bd4b093eb2bbfa02a1caeaf7642 Mon Sep 17 00:00:00 2001 From: vnmedeiros Date: Fri, 9 Apr 2021 11:27:22 -0300 Subject: [PATCH] test: create attribute html data-id with term id #396 --- tests/test-item-metadata.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/test-item-metadata.php b/tests/test-item-metadata.php index 50df7b7c8..8de75cfd9 100644 --- a/tests/test-item-metadata.php +++ b/tests/test-item-metadata.php @@ -705,12 +705,15 @@ class Item_Metadata extends TAINACAN_UnitTestCase { $item_taxonomy_metadata->set_value($term); $item_taxonomy_metadata->validate(); - $this->assertEquals($item_taxonomy_metadata->get_value_as_html(), "first term from my tax"); + $term_id = $term->get_id(); + $this->assertEquals($item_taxonomy_metadata->get_value_as_html(), "first term from my tax"); $taxonomy_meta->set_multiple('yes'); $item_taxonomy_metadata->set_value([ $term, $term2 ]); $item_taxonomy_metadata->validate(); - $this->assertEquals($item_taxonomy_metadata->get_value_as_html(), "first term from my tax | Second term from my tax"); + $term_id = $term->get_id(); + $term_id2 = $term2->get_id(); + $this->assertEquals($item_taxonomy_metadata->get_value_as_html(), "first term from my tax | Second term from my tax"); } function test_compound_metadata_html() {