File tree Expand file tree Collapse file tree 1 file changed +25
-18
lines changed Expand file tree Collapse file tree 1 file changed +25
-18
lines changed Original file line number Diff line number Diff line change @@ -1534,30 +1534,37 @@ public function get_mock_error() {
15341534 * @covers \AMP_Validation_Error_Taxonomy::get_error_details_json()
15351535 */
15361536 public function test_get_error_details_json () {
1537- $ term = (object ) [
1538- 'description ' => wp_json_encode (
1539- [
1540- 'node_type ' => 1 ,
1541- ]
1542- ),
1543- 'term_group ' => 1 ,
1544- ];
1537+ $ term = new WP_Term (
1538+ (object ) [
1539+ 'description ' => wp_json_encode (
1540+ [
1541+ 'node_type ' => 1 ,
1542+ ]
1543+ ),
1544+ 'term_group ' => 1 ,
1545+ ]
1546+ );
1547+
15451548 $ result = json_decode ( AMP_Validation_Error_Taxonomy::get_error_details_json ( $ term ), true );
15461549
15471550 $ this ->assertEquals ( 'ELEMENT ' , $ result ['node_type ' ] );
1548- $ this ->assertEquals ( 'Removed ' , $ result ['status ' ] );
1551+ $ this ->assertEquals ( true , $ result ['removed ' ] );
1552+ $ this ->assertEquals ( false , $ result ['reviewed ' ] );
15491553
1550- $ term = (object ) [
1551- 'description ' => wp_json_encode (
1552- [
1553- 'node_type ' => 2 ,
1554- ]
1555- ),
1556- 'term_group ' => 2 ,
1557- ];
1554+ $ term = new WP_Term (
1555+ (object ) [
1556+ 'description ' => wp_json_encode (
1557+ [
1558+ 'node_type ' => 2 ,
1559+ ]
1560+ ),
1561+ 'term_group ' => 2 ,
1562+ ]
1563+ );
15581564 $ result = json_decode ( AMP_Validation_Error_Taxonomy::get_error_details_json ( $ term ), true );
15591565
15601566 $ this ->assertEquals ( 'ATTRIBUTE ' , $ result ['node_type ' ] );
1561- $ this ->assertEquals ( 'Kept ' , $ result ['status ' ] );
1567+ $ this ->assertEquals ( false , $ result ['removed ' ] );
1568+ $ this ->assertEquals ( true , $ result ['reviewed ' ] );
15621569 }
15631570}
You can’t perform that action at this time.
0 commit comments