fix core fields tests

This commit is contained in:
Eduardo humberto 2018-02-16 15:50:24 -02:00
parent f2332ea16b
commit f173852c68
1 changed files with 4 additions and 5 deletions

View File

@ -169,6 +169,9 @@ class Fields extends TAINACAN_UnitTestCase {
$this->assertEquals( 6, sizeof( $retrieve_metadata ) ); $this->assertEquals( 6, sizeof( $retrieve_metadata ) );
} }
/**
* test remove core fields
*/
function test_core_fields(){ function test_core_fields(){
global $Tainacan_Fields; global $Tainacan_Fields;
@ -182,13 +185,9 @@ class Fields extends TAINACAN_UnitTestCase {
$core_fields = $Tainacan_Fields->get_core_fields( $collection_grandfather ); $core_fields = $Tainacan_Fields->get_core_fields( $collection_grandfather );
$this->expectException(\ErrorException::class);
if( $core_fields ){ if( $core_fields ){
foreach( $core_fields as $core_field ){ foreach( $core_fields as $core_field ){
wp_trash_post( $core_field->get_id() ); $this->assertFalse(wp_trash_post( $core_field->get_id() ) );
} }
} }
} }