Changeset 43117 for branches/4.9/tests/phpunit/tests/user.php
- Timestamp:
- 05/02/2018 04:20:35 AM (7 years ago)
- Location:
- branches/4.9
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.9
- Property svn:mergeinfo changed
/trunk merged: 43055,43116
- Property svn:mergeinfo changed
-
branches/4.9/tests/phpunit/tests/user.php
r41624 r43117 28 28 'user_email' => 'blackburn@battlefield3.com', 29 29 'user_url' => 'http://tacos.com', 30 'role' => 'contributor' 30 'role' => 'contributor', 31 'nickname' => 'Johnny', 32 'description' => 'I am a WordPress user that cares about privacy.', 31 33 ) ); 32 34 … … 1450 1452 $this->assertNotContains( ''Test' blog's "name" has <html entities> &', $email->subject, 'Email subject does contains HTML entities' ); 1451 1453 } 1454 1455 /** 1456 * Testing the `wp_user_personal_data_exporter_no_user` function when no user exists. 1457 * 1458 * @ticket 43547 1459 */ 1460 function test_wp_user_personal_data_exporter_no_user() { 1461 $actual = wp_user_personal_data_exporter( 'not-a-user-email@test.com' ); 1462 1463 $expected = array( 1464 'data' => array(), 1465 'done' => true, 1466 ); 1467 1468 $this->assertSame( $expected, $actual ); 1469 } 1470 1471 /** 1472 * Testing the `wp_user_personal_data_exporter_no_user` function when the requested 1473 * user exists. 1474 * 1475 * @ticket 43547 1476 */ 1477 function test_wp_user_personal_data_exporter() { 1478 $test_user = new WP_User( self::$contrib_id ); 1479 1480 $actual = wp_user_personal_data_exporter( $test_user->user_email ); 1481 1482 $this->assertTrue( $actual['done'] ); 1483 1484 // Number of exported users. 1485 $this->assertSame( 1, count( $actual['data'] ) ); 1486 1487 // Number of exported user properties. 1488 $this->assertSame( 11, count( $actual['data'][0]['data'] ) ); 1489 } 1452 1490 }
Note: See TracChangeset
for help on using the changeset viewer.