Changeset 54726 for trunk/tests/phpunit/tests/multisite/wpCountSites.php
- Timestamp:
- 10/31/2022 12:55:20 PM (3 years ago)
- File:
-
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/multisite/wpCountSites.php
r54721 r54726 4 4 5 5 /** 6 * A set of unit tests for WordPress Multisite 7 * 6 * @group ms-site 8 7 * @group multisite 9 8 */ 10 class Tests_Multisite extends WP_UnitTestCase { 11 12 public function test_wpmu_log_new_registrations() { 13 global $wpdb; 14 15 $user = new WP_User( 1 ); 16 $ip = preg_replace( '/[^0-9., ]/', '', $_SERVER['REMOTE_ADDR'] ); 17 18 wpmu_log_new_registrations( 1, 1 ); 19 20 // Currently there is no wrapper function for the registration_log. 21 $reg_blog = $wpdb->get_col( $wpdb->prepare( "SELECT email FROM {$wpdb->registration_log} WHERE {$wpdb->registration_log}.blog_id = 1 AND IP LIKE %s", $ip ) ); 22 $this->assertSame( $user->user_email, $reg_blog[ count( $reg_blog ) - 1 ] ); 23 } 9 class Tests_Multisite_wpCountSites extends WP_UnitTestCase { 24 10 25 11 /**
Note: See TracChangeset
for help on using the changeset viewer.