Changeset 53512
- Timestamp:
- 06/15/2022 07:32:25 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/rest-api/rest-posts-controller.php
r53511 r53512 1558 1558 */ 1559 1559 public function test_get_items_primes_parent_post_caches() { 1560 $parent_id1 = self::$post_ids[0];1561 $parent_id2 = self::$post_ids[1];1562 $parent_ids = array( $parent_id2, $parent_id1);1563 1564 $ this->factory->attachment->create_object(1560 $parent_id1 = self::$post_ids[0]; 1561 $parent_id2 = self::$post_ids[1]; 1562 $parent_ids = array( $parent_id1, $parent_id2 ); 1563 $attachment_ids = array(); 1564 $attachment_ids[] = $this->factory->attachment->create_object( 1565 1565 DIR_TESTDATA . '/images/canola.jpg', 1566 1566 $parent_id1, … … 1571 1571 ); 1572 1572 1573 $ this->factory->attachment->create_object(1573 $attachment_ids[] = $this->factory->attachment->create_object( 1574 1574 DIR_TESTDATA . '/images/canola.jpg', 1575 1575 $parent_id2, … … 1582 1582 // Attachment creation warms parent IDs. Needs clean up for test. 1583 1583 wp_cache_delete_multiple( $parent_ids, 'posts' ); 1584 wp_cache_delete_multiple( $attachment_ids, 'posts' ); 1584 1585 1585 1586 $filter = new MockAction(); … … 1592 1593 $last = end( $args ); 1593 1594 $this->assertIsArray( $last, 'The last value is not an array' ); 1594 // TODO: Enable this once the test is updated to pass with persistent object cache. 1595 // $this->assertSameSets( $parent_ids, $last[1] ); 1595 $this->assertSameSets( $parent_ids, $last[1] ); 1596 1596 } 1597 1597
Note: See TracChangeset
for help on using the changeset viewer.