Changeset 51403
- Timestamp:
- 07/11/2021 12:41:48 PM (3 years ago)
- Location:
- trunk/tests/phpunit/tests
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/actions.php
r51397 r51403 280 280 // Just in case we don't trust assertSame(). 281 281 $obj->foo = true; 282 $this->assert False( empty( $args[0][0]->foo ));282 $this->assertNotEmpty( $args[0][0]->foo ); 283 283 } 284 284 -
trunk/tests/phpunit/tests/filters.php
r48937 r51403 232 232 // Just in case we don't trust assertSame(). 233 233 $obj->foo = true; 234 $this->assert False( empty( $args[0][0]->foo ));234 $this->assertNotEmpty( $args[0][0]->foo ); 235 235 } 236 236 … … 255 255 // Just in case we don't trust assertSame(). 256 256 $obj->foo = true; 257 $this->assert False( empty( $args[0][1]->foo ));257 $this->assertNotEmpty( $args[0][1]->foo ); 258 258 259 259 $args = $b->get_args(); … … 261 261 // Just in case we don't trust assertSame(). 262 262 $obj->foo = true; 263 $this->assert False( empty( $args[0][1]->foo ));263 $this->assertNotEmpty( $args[0][1]->foo ); 264 264 265 265 } -
trunk/tests/phpunit/tests/http/base.php
r51397 r51403 226 226 $this->skipTestOnTimeout( $res ); 227 227 $this->assertSame( 'PASS', wp_remote_retrieve_body( $res ) ); 228 $this->assert True( ! empty( $res['headers']['location'] ));228 $this->assertNotEmpty( $res['headers']['location'] ); 229 229 } 230 230 -
trunk/tests/phpunit/tests/import/base.php
r47122 r51403 25 25 $file = realpath( $filename ); 26 26 27 $this->assert True( ! empty( $file ), 'Path to import file is empty.' );27 $this->assertNotEmpty( $file, 'Path to import file is empty.' ); 28 28 $this->assertTrue( is_file( $file ), 'Import file is not a file.' ); 29 29 -
trunk/tests/phpunit/tests/post/attachments.php
r49024 r51403 19 19 20 20 $upload = wp_upload_bits( $filename, null, $contents ); 21 $this->assert True( empty( $upload['error'] ));21 $this->assertEmpty( $upload['error'] ); 22 22 } 23 23 … … 29 29 30 30 $upload = wp_upload_bits( wp_basename( $filename ), null, $contents ); 31 $this->assert True( empty( $upload['error'] ));31 $this->assertEmpty( $upload['error'] ); 32 32 33 33 $id = $this->_make_attachment( $upload ); … … 66 66 67 67 $upload = wp_upload_bits( wp_basename( $filename ), null, $contents ); 68 $this->assert True( empty( $upload['error'] ));68 $this->assertEmpty( $upload['error'] ); 69 69 70 70 $id = $this->_make_attachment( $upload ); … … 120 120 121 121 $upload = wp_upload_bits( wp_basename( $filename ), null, $contents ); 122 $this->assert True( empty( $upload['error'] ));122 $this->assertEmpty( $upload['error'] ); 123 123 124 124 $id = $this->_make_attachment( $upload ); … … 177 177 178 178 $upload = wp_upload_bits( wp_basename( $filename ), null, $contents ); 179 $this->assert True( empty( $upload['error'] ));179 $this->assertEmpty( $upload['error'] ); 180 180 181 181 $id = $this->_make_attachment( $upload ); … … 220 220 221 221 $upload = wp_upload_bits( wp_basename( $filename ), null, $contents ); 222 $this->assert True( empty( $upload['error'] ));222 $this->assertEmpty( $upload['error'] ); 223 223 224 224 $upload['url'] = ''; … … 226 226 227 227 $guid = get_the_guid( $id ); 228 $this->assert False( empty( $guid ));228 $this->assertNotEmpty( $guid ); 229 229 } 230 230 … … 237 237 238 238 $upload = wp_upload_bits( wp_basename( $filename ), null, $contents ); 239 $this->assert True( empty( $upload['error'] ));239 $this->assertEmpty( $upload['error'] ); 240 240 241 241 $id = $this->_make_attachment( $upload ); … … 263 263 264 264 $upload = wp_upload_bits( wp_basename( $filename ), null, $contents ); 265 $this->assert True( empty( $upload['error'] ));265 $this->assertEmpty( $upload['error'] ); 266 266 267 267 $attachment_id = $this->_make_attachment( $upload ); … … 295 295 296 296 $upload = wp_upload_bits( wp_basename( $filename ), null, $contents ); 297 $this->assert True( empty( $upload['error'] ));297 $this->assertEmpty( $upload['error'] ); 298 298 299 299 // Set attachment ID. … … 320 320 321 321 $upload = wp_upload_bits( wp_basename( $filename ), null, $contents ); 322 $this->assert True( empty( $upload['error'] ));322 $this->assertEmpty( $upload['error'] ); 323 323 324 324 // Set attachment ID. … … 345 345 346 346 $upload = wp_upload_bits( wp_basename( $filename ), null, $contents ); 347 $this->assert True( empty( $upload['error'] ));347 $this->assertEmpty( $upload['error'] ); 348 348 349 349 // Set attachment ID. … … 373 373 374 374 $upload = wp_upload_bits( wp_basename( $filename ), null, $contents ); 375 $this->assert True( empty( $upload['error'] ));375 $this->assertEmpty( $upload['error'] ); 376 376 377 377 // Set attachment ID. … … 401 401 402 402 $upload = wp_upload_bits( wp_basename( $filename ), null, $contents ); 403 $this->assert True( empty( $upload['error'] ));403 $this->assertEmpty( $upload['error'] ); 404 404 405 405 // Set attachment ID. … … 428 428 429 429 $upload = wp_upload_bits( wp_basename( $filename ), null, $contents ); 430 $this->assert True( empty( $upload['error'] ));430 $this->assertEmpty( $upload['error'] ); 431 431 432 432 // Set attachment ID. -
trunk/tests/phpunit/tests/query/setupPostdata.php
r50449 r51403 318 318 setup_postdata( $post2 ); 319 319 320 $this->assert True( empty( $GLOBALS['more'] ));320 $this->assertEmpty( $GLOBALS['more'] ); 321 321 } 322 322 … … 336 336 setup_postdata( $post ); 337 337 338 $this->assert True( empty( $GLOBALS['more'] ));338 $this->assertEmpty( $GLOBALS['more'] ); 339 339 } 340 340 … … 373 373 374 374 // $more should refer to the current loop. 375 $this->assert True( empty( $GLOBALS['more'] ));375 $this->assertEmpty( $GLOBALS['more'] ); 376 376 } 377 377 } -
trunk/tests/phpunit/tests/rest-api/rest-block-renderer-controller.php
r50449 r51403 479 479 $data = $response->get_data(); 480 480 481 $this->assert True( empty( $data['rendered'] ));481 $this->assertEmpty( $data['rendered'] ); 482 482 483 483 // Now test with post ID. -
trunk/tests/phpunit/tests/rest-api/rest-schema-setup.php
r51335 r51403 74 74 75 75 $this->assertIsArray( $routes, '`get_routes` should return an array.' ); 76 $this->assert True( ! empty( $routes ), 'Routes should not be empty.' );76 $this->assertNotEmpty( $routes, 'Routes should not be empty.' ); 77 77 78 78 $routes = array_filter( array_keys( $routes ), array( $this, 'is_builtin_route' ) ); … … 473 473 "HTTP $status from $route[route]: " . json_encode( $data ) 474 474 ); 475 $this->assert True( ! empty( $data ), $route['name'] . ' route should return data.' );475 $this->assertNotEmpty( $data, $route['name'] . ' route should return data.' ); 476 476 477 477 $fixture = $this->normalize_fixture( $data, $route['name'] ); -
trunk/tests/phpunit/tests/rest-api/rest-users-controller.php
r51367 r51403 261 261 262 262 foreach ( $users as $user ) { 263 $this->assert True( count_user_posts( $user['id'], $rest_post_types ) > 0);263 $this->assertNotEmpty( count_user_posts( $user['id'], $rest_post_types ) ); 264 264 265 265 // Ensure we don't expose non-public data. -
trunk/tests/phpunit/tests/term/wpInsertTerm.php
r51331 r51403 188 188 $term = self::factory()->tag->create_and_get( array( 'name' => 'Bozo' ) ); 189 189 $this->assertNotWPError( $term ); 190 $this->assert True( empty( $term->errors ));190 $this->assertEmpty( $term->errors ); 191 191 192 192 // Test existing term name with unique slug. -
trunk/tests/phpunit/tests/theme.php
r51397 r51403 289 289 290 290 $root_uri = get_theme_root_uri(); 291 $this->assert True( ! empty( $root_uri ));291 $this->assertNotEmpty( $root_uri ); 292 292 293 293 $this->assertSame( $root_fs . '/' . get_stylesheet(), get_stylesheet_directory() ); -
trunk/tests/phpunit/tests/theme/themeDir.php
r51371 r51403 46 46 $this->assertSame( $themes['WordPress Default'], $theme ); 47 47 48 $this->assert False( empty( $theme ));48 $this->assertNotEmpty( $theme ); 49 49 50 50 // echo gen_tests_array( 'theme', $theme ); … … 75 75 $theme = get_theme( 'Sandbox' ); 76 76 77 $this->assert False( empty( $theme ));77 $this->assertNotEmpty( $theme ); 78 78 79 79 // echo gen_tests_array( 'theme', $theme ); … … 112 112 113 113 $theme = $themes['Stylesheet Only']; 114 $this->assert False( empty( $theme ));114 $this->assertNotEmpty( $theme ); 115 115 116 116 // echo gen_tests_array( 'theme', $theme ); … … 206 206 207 207 $theme = $themes['Page Template Theme']; 208 $this->assert False( empty( $theme ));208 $this->assertNotEmpty( $theme ); 209 209 210 210 $templates = $theme['Template Files'];
Note: See TracChangeset
for help on using the changeset viewer.