fix core fields tests
This commit is contained in:
parent
f2332ea16b
commit
f173852c68
|
@ -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() ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue