tainacan csv importer - update hierarchy test

This commit is contained in:
Eduardo Humberto 2018-10-22 22:18:36 -03:00
parent 746721ed8e
commit 16d24828df
1 changed files with 5 additions and 6 deletions

View File

@ -384,14 +384,13 @@ class ImporterTests extends TAINACAN_UnitTestCase {
$items = $Tainacan_Items->fetch( ['order'=> 'ASC','orderby' => 'date'], $collection, 'OBJECT' );
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'] ) ){
if( $index === 0 ){
$term = $singleItemMetadata->get_value();
if( in_array( $item->get_title(),['Data 11','Data 51'] ) )
$this->assertTrue(in_array( $term->get_name(),['DATA 151','DATA551'] ));
}
$this->assertTrue(in_array( $term->get_name(),['DATA 151','DATA551'] ));
}
}