tainacan csv importer - improve csv multiple test

This commit is contained in:
Eduardo Humberto 2018-10-23 18:31:40 -03:00
parent 75f4e9152b
commit cca72df7fa
1 changed files with 3 additions and 4 deletions

View File

@ -385,11 +385,10 @@ class ImporterTests extends TAINACAN_UnitTestCase {
foreach ( $items as $index => $item ) { foreach ( $items as $index => $item ) {
$singleItemMetadata = new Entities\Item_Metadata_Entity( $item, $metadata_taxonomy ); $singleItemMetadata = new Entities\Item_Metadata_Entity( $item, $metadata_taxonomy );
if( in_array( $item->get_title(),[ 'Data 11','Data 51', 'Data 12','Data 52'] ) ){
$term = $singleItemMetadata->get_value(); $term = $singleItemMetadata->get_value();
$this->assertTrue(in_array( $term->get_name(),['DATA 151','DATA551'] ));
if( in_array( $item->get_title(),[ 'Data 11','Data 51', 'Data 12','Data 52'] ) && $term ){
$this->assertTrue(in_array( strtoupper($term->get_name()),['DATA 151','DATA551'] ));
} }
} }