Unit Tests: Account for the string changes in [38077].
See #18218. git-svn-id: https://develop.svn.wordpress.org/trunk@38078 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
776b3c3f1d
commit
59f15cdea9
|
@ -254,7 +254,7 @@ class Tests_Taxonomy extends WP_UnitTestCase {
|
|||
public function test_get_objects_in_term_should_return_invalid_taxonomy_error() {
|
||||
$terms = get_objects_in_term( 1, 'invalid_taxonomy' );
|
||||
$this->assertInstanceOf( 'WP_Error', $terms );
|
||||
$this->assertEquals( 'Invalid taxonomy', $terms->get_error_message() );
|
||||
$this->assertEquals( 'invalid_taxonomy', $terms->get_error_code() );
|
||||
}
|
||||
|
||||
public function test_get_objects_in_term_should_return_empty_array() {
|
||||
|
|
|
@ -25,7 +25,7 @@ class Tests_XMLRPC_wp_deleteTerm extends WP_XMLRPC_UnitTestCase {
|
|||
$result = $this->myxmlrpcserver->wp_deleteTerm( array( 1, 'subscriber', 'subscriber', '', 0 ) );
|
||||
$this->assertInstanceOf( 'IXR_Error', $result );
|
||||
$this->assertEquals( 403, $result->code );
|
||||
$this->assertEquals( __( 'Invalid taxonomy' ), $result->message );
|
||||
$this->assertEquals( __( 'Invalid taxonomy.' ), $result->message );
|
||||
}
|
||||
|
||||
function test_invalid_taxonomy() {
|
||||
|
@ -34,7 +34,7 @@ class Tests_XMLRPC_wp_deleteTerm extends WP_XMLRPC_UnitTestCase {
|
|||
$result = $this->myxmlrpcserver->wp_deleteTerm( array( 1, 'subscriber', 'subscriber', 'not_existing', 0 ) );
|
||||
$this->assertInstanceOf( 'IXR_Error', $result );
|
||||
$this->assertEquals( 403, $result->code );
|
||||
$this->assertEquals( __( 'Invalid taxonomy' ), $result->message );
|
||||
$this->assertEquals( __( 'Invalid taxonomy.' ), $result->message );
|
||||
}
|
||||
|
||||
function test_incapable_user() {
|
||||
|
@ -61,7 +61,7 @@ class Tests_XMLRPC_wp_deleteTerm extends WP_XMLRPC_UnitTestCase {
|
|||
$result = $this->myxmlrpcserver->wp_deleteTerm( array( 1, 'editor', 'editor', 'category', 9999 ) );
|
||||
$this->assertInstanceOf( 'IXR_Error', $result );
|
||||
$this->assertEquals( 404, $result->code );
|
||||
$this->assertEquals( __('Invalid term ID'), $result->message );
|
||||
$this->assertEquals( __( 'Invalid term ID.' ), $result->message );
|
||||
}
|
||||
|
||||
function test_term_deleted() {
|
||||
|
|
|
@ -31,7 +31,7 @@ class Tests_XMLRPC_wp_editTerm extends WP_XMLRPC_UnitTestCase {
|
|||
$result = $this->myxmlrpcserver->wp_editTerm( array( 1, 'subscriber', 'subscriber', '', array( 'taxonomy' => '' ) ) );
|
||||
$this->assertInstanceOf( 'IXR_Error', $result );
|
||||
$this->assertEquals( 403, $result->code );
|
||||
$this->assertEquals( __( 'Invalid taxonomy' ), $result->message );
|
||||
$this->assertEquals( __( 'Invalid taxonomy.' ), $result->message );
|
||||
}
|
||||
|
||||
function test_invalid_taxonomy() {
|
||||
|
@ -40,7 +40,7 @@ class Tests_XMLRPC_wp_editTerm extends WP_XMLRPC_UnitTestCase {
|
|||
$result = $this->myxmlrpcserver->wp_editTerm( array( 1, 'subscriber', 'subscriber', $this->parent_term['term_id'], array( 'taxonomy' => 'not_existing' ) ) );
|
||||
$this->assertInstanceOf( 'IXR_Error', $result );
|
||||
$this->assertEquals( 403, $result->code );
|
||||
$this->assertEquals( __( 'Invalid taxonomy' ), $result->message );
|
||||
$this->assertEquals( __( 'Invalid taxonomy.' ), $result->message );
|
||||
}
|
||||
|
||||
function test_incapable_user() {
|
||||
|
@ -58,7 +58,7 @@ class Tests_XMLRPC_wp_editTerm extends WP_XMLRPC_UnitTestCase {
|
|||
$result = $this->myxmlrpcserver->wp_editTerm( array( 1, 'editor', 'editor', 9999, array( 'taxonomy' => 'category' ) ) );
|
||||
$this->assertInstanceOf( 'IXR_Error', $result );
|
||||
$this->assertEquals( 404, $result->code );
|
||||
$this->assertEquals( __( 'Invalid term ID' ), $result->message );
|
||||
$this->assertEquals( __( 'Invalid term ID.' ), $result->message );
|
||||
}
|
||||
|
||||
function test_empty_term() {
|
||||
|
|
|
@ -17,7 +17,7 @@ class Tests_XMLRPC_wp_getTaxonomy extends WP_XMLRPC_UnitTestCase {
|
|||
$result = $this->myxmlrpcserver->wp_getTaxonomy( array( 1, 'editor', 'editor', '' ) );
|
||||
$this->assertInstanceOf( 'IXR_Error', $result );
|
||||
$this->assertEquals( 403, $result->code );
|
||||
$this->assertEquals( __( 'Invalid taxonomy' ), $result->message );
|
||||
$this->assertEquals( __( 'Invalid taxonomy.' ), $result->message );
|
||||
}
|
||||
|
||||
function test_invalid_taxonomy() {
|
||||
|
@ -26,7 +26,7 @@ class Tests_XMLRPC_wp_getTaxonomy extends WP_XMLRPC_UnitTestCase {
|
|||
$result = $this->myxmlrpcserver->wp_getTaxonomy( array( 1, 'editor', 'editor', 'not_existing' ) );
|
||||
$this->assertInstanceOf( 'IXR_Error', $result );
|
||||
$this->assertEquals( 403, $result->code );
|
||||
$this->assertEquals( __( 'Invalid taxonomy' ), $result->message );
|
||||
$this->assertEquals( __( 'Invalid taxonomy.' ), $result->message );
|
||||
}
|
||||
|
||||
function test_incapable_user() {
|
||||
|
|
|
@ -25,7 +25,7 @@ class Tests_XMLRPC_wp_getTerm extends WP_XMLRPC_UnitTestCase {
|
|||
$result = $this->myxmlrpcserver->wp_getTerm( array( 1, 'editor', 'editor', '', 0 ) );
|
||||
$this->assertInstanceOf( 'IXR_Error', $result );
|
||||
$this->assertEquals( 403, $result->code );
|
||||
$this->assertEquals( __( 'Invalid taxonomy' ), $result->message );
|
||||
$this->assertEquals( __( 'Invalid taxonomy.' ), $result->message );
|
||||
}
|
||||
|
||||
function test_invalid_taxonomy() {
|
||||
|
@ -34,7 +34,7 @@ class Tests_XMLRPC_wp_getTerm extends WP_XMLRPC_UnitTestCase {
|
|||
$result = $this->myxmlrpcserver->wp_getTerm( array( 1, 'editor', 'editor', 'not_existing', 0 ) );
|
||||
$this->assertInstanceOf( 'IXR_Error', $result );
|
||||
$this->assertEquals( 403, $result->code );
|
||||
$this->assertEquals( __( 'Invalid taxonomy' ), $result->message );
|
||||
$this->assertEquals( __( 'Invalid taxonomy.' ), $result->message );
|
||||
}
|
||||
|
||||
function test_incapable_user() {
|
||||
|
@ -62,7 +62,7 @@ class Tests_XMLRPC_wp_getTerm extends WP_XMLRPC_UnitTestCase {
|
|||
$result = $this->myxmlrpcserver->wp_getTerm( array( 1, 'editor', 'editor', 'category', 9999 ) );
|
||||
$this->assertInstanceOf( 'IXR_Error', $result );
|
||||
$this->assertEquals( 404, $result->code );
|
||||
$this->assertEquals( __('Invalid term ID'), $result->message );
|
||||
$this->assertEquals( __( 'Invalid term ID.' ), $result->message );
|
||||
}
|
||||
|
||||
function test_valid_term() {
|
||||
|
|
|
@ -17,7 +17,7 @@ class Tests_XMLRPC_wp_getTerms extends WP_XMLRPC_UnitTestCase {
|
|||
$result = $this->myxmlrpcserver->wp_getTerms( array( 1, 'editor', 'editor', '' ) );
|
||||
$this->assertInstanceOf( 'IXR_Error', $result );
|
||||
$this->assertEquals( 403, $result->code );
|
||||
$this->assertEquals( __( 'Invalid taxonomy' ), $result->message );
|
||||
$this->assertEquals( __( 'Invalid taxonomy.' ), $result->message );
|
||||
}
|
||||
|
||||
function test_invalid_taxonomy() {
|
||||
|
@ -26,7 +26,7 @@ class Tests_XMLRPC_wp_getTerms extends WP_XMLRPC_UnitTestCase {
|
|||
$result = $this->myxmlrpcserver->wp_getTerms( array( 1, 'editor', 'editor', 'not_existing' ) );
|
||||
$this->assertInstanceOf( 'IXR_Error', $result );
|
||||
$this->assertEquals( 403, $result->code );
|
||||
$this->assertEquals( __( 'Invalid taxonomy' ), $result->message );
|
||||
$this->assertEquals( __( 'Invalid taxonomy.' ), $result->message );
|
||||
}
|
||||
|
||||
function test_incapable_user() {
|
||||
|
|
|
@ -26,7 +26,7 @@ class Tests_XMLRPC_wp_newTerm extends WP_XMLRPC_UnitTestCase {
|
|||
$result = $this->myxmlrpcserver->wp_newTerm( array( 1, 'editor', 'editor', array( 'taxonomy' => '' ) ) );
|
||||
$this->assertInstanceOf( 'IXR_Error', $result );
|
||||
$this->assertEquals( 403, $result->code );
|
||||
$this->assertEquals( __( 'Invalid taxonomy' ), $result->message );
|
||||
$this->assertEquals( __( 'Invalid taxonomy.' ), $result->message );
|
||||
}
|
||||
|
||||
function test_invalid_taxonomy() {
|
||||
|
@ -35,7 +35,7 @@ class Tests_XMLRPC_wp_newTerm extends WP_XMLRPC_UnitTestCase {
|
|||
$result = $this->myxmlrpcserver->wp_newTerm( array( 1, 'editor', 'editor', array( 'taxonomy' => 'not_existing' ) ) );
|
||||
$this->assertInstanceOf( 'IXR_Error', $result );
|
||||
$this->assertEquals( 403, $result->code );
|
||||
$this->assertEquals( __( 'Invalid taxonomy' ), $result->message );
|
||||
$this->assertEquals( __( 'Invalid taxonomy.' ), $result->message );
|
||||
}
|
||||
|
||||
function test_incapable_user() {
|
||||
|
|
Loading…
Reference in New Issue