- Timestamp:
- 07/05/2021 05:21:53 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/rest-api/rest-users-controller.php
r49603 r51331 1212 1212 1213 1213 if ( is_multisite() ) { 1214 $this->assertI nternalType( 'array',$data['additional_errors'] );1214 $this->assertIsArray( $data['additional_errors'] ); 1215 1215 $this->assertCount( 1, $data['additional_errors'] ); 1216 1216 $error = $data['additional_errors'][0]; … … 1218 1218 $this->assertSame( 'Usernames can only contain lowercase letters (a-z) and numbers.', $error['message'] ); 1219 1219 } else { 1220 $this->assertI nternalType( 'array',$data['data']['params'] );1220 $this->assertIsArray( $data['data']['params'] ); 1221 1221 $errors = $data['data']['params']; 1222 $this->assertI nternalType( 'string',$errors['username'] );1222 $this->assertIsString( $errors['username'] ); 1223 1223 $this->assertSame( 'This username is invalid because it uses illegal characters. Please enter a valid username.', $errors['username'] ); 1224 1224 } … … 1258 1258 1259 1259 $data = $response->get_data(); 1260 $this->assertI nternalType( 'array',$data['data']['params'] );1260 $this->assertIsArray( $data['data']['params'] ); 1261 1261 $errors = $data['data']['params']; 1262 $this->assertI nternalType( 'string',$errors['username'] );1262 $this->assertIsString( $errors['username'] ); 1263 1263 $this->assertSame( 'Sorry, that username is not allowed.', $errors['username'] ); 1264 1264 } … … 1382 1382 $this->assertErrorResponse( 'rest_invalid_param', $switched_response, 400 ); 1383 1383 $data = $switched_response->get_data(); 1384 $this->assertI nternalType( 'array',$data['additional_errors'] );1384 $this->assertIsArray( $data['additional_errors'] ); 1385 1385 $this->assertCount( 2, $data['additional_errors'] ); 1386 1386 $errors = $data['additional_errors'];
Note: See TracChangeset
for help on using the changeset viewer.