Changeset 51367 for trunk/tests/phpunit/tests/user/query.php
- Timestamp:
- 07/07/2021 10:32:56 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/user/query.php
r51196 r51367 138 138 139 139 // +1 for the default user created during installation. 140 $this->assert Same( 13, count( $users ));140 $this->assertCount( 13, $users ); 141 141 foreach ( $users as $user ) { 142 142 $this->assertInstanceOf( 'WP_User', $user ); … … 150 150 ); 151 151 $users = $users->get_results(); 152 $this->assert Same( 13, count( $users ));152 $this->assertCount( 13, $users ); 153 153 foreach ( $users as $user ) { 154 154 $this->assertInstanceOf( 'WP_User', $user ); … … 503 503 $users = new WP_User_Query( array( 'blog_id' => get_current_blog_id() ) ); 504 504 $users = $users->get_results(); 505 $this->assert Same( 13, count( $users ));505 $this->assertCount( 13, $users ); 506 506 507 507 $users = new WP_User_Query( … … 512 512 ); 513 513 $users = $users->get_results(); 514 $this->assert Same( 10, count( $users ));514 $this->assertCount( 10, $users ); 515 515 516 516 $users = new WP_User_Query( … … 521 521 ); 522 522 $users = $users->get_results(); 523 $this->assert Same( 2, count( $users ));523 $this->assertCount( 2, $users ); 524 524 525 525 $users = new WP_User_Query( … … 530 530 ); 531 531 $users = $users->get_results(); 532 $this->assert Same( 13, count( $users ));532 $this->assertCount( 13, $users ); 533 533 } 534 534 … … 1315 1315 $users = $wp_user_search->get_results(); 1316 1316 1317 $this->assert Same( 2, count( $users ));1317 $this->assertCount( 2, $users ); 1318 1318 } 1319 1319 … … 1324 1324 $wp_user_search = new WP_User_Query( array( 'role__in' => array( 'subscriber', 'editor' ) ) ); 1325 1325 $users = $wp_user_search->get_results(); 1326 $this->assert Same( 5, count( $users ));1326 $this->assertCount( 5, $users ); 1327 1327 } 1328 1328 … … 1337 1337 ); 1338 1338 1339 $this->assert Same( 2, count( $users ));1339 $this->assertCount( 2, $users ); 1340 1340 } 1341 1341 … … 1373 1373 ); 1374 1374 1375 $this->assert Same( 2, count( $users ));1375 $this->assertCount( 2, $users ); 1376 1376 } 1377 1377 … … 1393 1393 $users = $users->get_results(); 1394 1394 1395 $this->assert Same( 2, count( $users ));1395 $this->assertCount( 2, $users ); 1396 1396 1397 1397 foreach ( $users as $user ) { … … 1408 1408 1409 1409 // +1 for the default user created during installation. 1410 $this->assert Same( 8, count( $users ));1410 $this->assertCount( 8, $users ); 1411 1411 foreach ( $users as $user ) { 1412 1412 $this->assertInstanceOf( 'WP_User', $user ); … … 1437 1437 ); 1438 1438 1439 $this->assert Same( 2, count( $users ));1439 $this->assertCount( 2, $users ); 1440 1440 } 1441 1441 … … 1483 1483 1484 1484 // Check results. 1485 $this->assert Same( 1, count( $users ));1485 $this->assertCount( 1, $users ); 1486 1486 $this->assertSame( self::$editor_ids[0], (int) $users[0]->ID ); 1487 1487 } … … 1498 1498 1499 1499 // +1 for the default user created during installation. 1500 $this->assert Same( 11, count( $users ));1500 $this->assertCount( 11, $users ); 1501 1501 1502 1502 $users = get_users( … … 1507 1507 1508 1508 // +1 for the default user created during installation. 1509 $this->assert Same( 10, count( $users ));1509 $this->assertCount( 10, $users ); 1510 1510 } 1511 1511 … … 1525 1525 ); 1526 1526 1527 $this->assert Same( 5, count( $users ));1527 $this->assertCount( 5, $users ); 1528 1528 1529 1529 $users = get_users( … … 1534 1534 ); 1535 1535 1536 $this->assert Same( 3, count( $users ));1536 $this->assertCount( 3, $users ); 1537 1537 } 1538 1538 … … 1551 1551 ); 1552 1552 1553 $this->assert Same( 1, count( $users ));1553 $this->assertCount( 1, $users ); 1554 1554 } 1555 1555 … … 1569 1569 1570 1570 // +1 for the default user created during installation. 1571 $this->assert Same( 12, count( $users ));1571 $this->assertCount( 12, $users ); 1572 1572 1573 1573 $users = get_users( … … 1578 1578 1579 1579 // +1 for the default user created during installation. 1580 $this->assert Same( 10, count( $users ));1580 $this->assertCount( 10, $users ); 1581 1581 } 1582 1582
Note: See TracChangeset
for help on using the changeset viewer.