|
@@ 1306-1320 (lines=15) @@
|
| 1303 |
|
/** |
| 1304 |
|
* @ticket 19623 |
| 1305 |
|
*/ |
| 1306 |
|
public function test_get_comments_with_include_unapproved_mixed_array() |
| 1307 |
|
{ |
| 1308 |
|
$c1 = self::factory()->comment->create(array( 'comment_post_ID' => self::$post_id, 'user_id' => 7, 'comment_approved' => '1' )); |
| 1309 |
|
$c2 = self::factory()->comment->create(array( 'comment_post_ID' => self::$post_id, 'user_id' => 0, 'comment_approved' => '1', 'comment_author' => 'foo', 'comment_author_email' => '[email protected]' )); |
| 1310 |
|
$c3 = self::factory()->comment->create(array( 'comment_post_ID' => self::$post_id, 'user_id' => 0, 'comment_approved' => '0', 'comment_author' => 'foo', 'comment_author_email' => '[email protected]' )); |
| 1311 |
|
$c4 = self::factory()->comment->create(array( 'comment_post_ID' => self::$post_id, 'user_id' => 0, 'comment_approved' => '0', 'comment_author' => 'foo', 'comment_author_email' => '[email protected]' )); |
| 1312 |
|
$c5 = self::factory()->comment->create(array( 'comment_post_ID' => self::$post_id, 'user_id' => 4, 'comment_approved' => '0', 'comment_author' => 'foo', 'comment_author_email' => '[email protected]' )); |
| 1313 |
|
|
| 1314 |
|
$found = get_comments( |
| 1315 |
|
array( |
| 1316 |
|
'fields' => 'ids', |
| 1317 |
|
'include_unapproved' => array( '[email protected]', 4 ), |
| 1318 |
|
'status' => 'approve', |
| 1319 |
|
) |
| 1320 |
|
); |
| 1321 |
|
|
| 1322 |
|
$this->assertEqualSets(array( $c1, $c2, $c3, $c5 ), $found); |
| 1323 |
|
} |
|
@@ 1328-1342 (lines=15) @@
|
| 1325 |
|
/** |
| 1326 |
|
* @ticket 19623 |
| 1327 |
|
*/ |
| 1328 |
|
public function test_get_comments_with_include_unapproved_mixed_comma_separated() |
| 1329 |
|
{ |
| 1330 |
|
$c1 = self::factory()->comment->create(array( 'comment_post_ID' => self::$post_id, 'user_id' => 7, 'comment_approved' => '1' )); |
| 1331 |
|
$c2 = self::factory()->comment->create(array( 'comment_post_ID' => self::$post_id, 'user_id' => 0, 'comment_approved' => '1', 'comment_author' => 'foo', 'comment_author_email' => '[email protected]' )); |
| 1332 |
|
$c3 = self::factory()->comment->create(array( 'comment_post_ID' => self::$post_id, 'user_id' => 0, 'comment_approved' => '0', 'comment_author' => 'foo', 'comment_author_email' => '[email protected]' )); |
| 1333 |
|
$c4 = self::factory()->comment->create(array( 'comment_post_ID' => self::$post_id, 'user_id' => 0, 'comment_approved' => '0', 'comment_author' => 'foo', 'comment_author_email' => '[email protected]' )); |
| 1334 |
|
$c5 = self::factory()->comment->create(array( 'comment_post_ID' => self::$post_id, 'user_id' => 4, 'comment_approved' => '0', 'comment_author' => 'foo', 'comment_author_email' => '[email protected]' )); |
| 1335 |
|
|
| 1336 |
|
$found = get_comments( |
| 1337 |
|
array( |
| 1338 |
|
'fields' => 'ids', |
| 1339 |
|
'include_unapproved' => '[email protected], 4', |
| 1340 |
|
'status' => 'approve', |
| 1341 |
|
) |
| 1342 |
|
); |
| 1343 |
|
|
| 1344 |
|
$this->assertEqualSets(array( $c1, $c2, $c3, $c5 ), $found); |
| 1345 |
|
} |