Skip to content

Commit 318051f

Browse files
committed
Collaboration: Remove deprecated wp-sync/v1 route test
The backward-compatible wp-sync/v1 route alias was removed in 24f4fdc, making this test invalid.
1 parent 14ba560 commit 318051f

1 file changed

Lines changed: 0 additions & 47 deletions

File tree

tests/phpunit/tests/rest-api/rest-collaboration-server.php

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1754,53 +1754,6 @@ public function test_collaboration_awareness_cache_reflects_latest_write(): void
17541754
* Query count tests.
17551755
*/
17561756

1757-
/*
1758-
* Deprecated route tests.
1759-
*/
1760-
1761-
/**
1762-
* Verifies the deprecated wp-sync/v1 route alias works identically to
1763-
* the canonical wp-collaboration/v1 namespace.
1764-
*
1765-
* @ticket 64696
1766-
*/
1767-
public function test_collaboration_deprecated_sync_route() {
1768-
wp_set_current_user( self::$editor_id );
1769-
1770-
$room = $this->get_post_room();
1771-
$update = array(
1772-
'type' => 'update',
1773-
'data' => 'c3luYyByb3V0ZQ==',
1774-
);
1775-
1776-
// Send an update via the deprecated namespace.
1777-
$response = $this->dispatch_collaboration(
1778-
array(
1779-
$this->build_room( $room, '1', 0, array( 'user' => 'client1' ), array( $update ) ),
1780-
),
1781-
'wp-sync/v1'
1782-
);
1783-
1784-
$this->assertSame( 200, $response->get_status(), 'Deprecated wp-sync/v1 route should return 200.' );
1785-
1786-
$data = $response->get_data();
1787-
$this->assertArrayHasKey( 'rooms', $data, 'Response should contain rooms key.' );
1788-
$this->assertSame( $room, $data['rooms'][0]['room'], 'Room identifier should match.' );
1789-
1790-
// Verify the update is retrievable via the canonical namespace.
1791-
$response2 = $this->dispatch_collaboration(
1792-
array(
1793-
$this->build_room( $room, '2', 0 ),
1794-
)
1795-
);
1796-
1797-
$updates = $response2->get_data()['rooms'][0]['updates'];
1798-
$this->assertNotEmpty( $updates, 'Update sent via deprecated route should be retrievable via canonical route.' );
1799-
1800-
$update_data = wp_list_pluck( $updates, 'data' );
1801-
$this->assertContains( 'c3luYyByb3V0ZQ==', $update_data );
1802-
}
1803-
18041757
/*
18051758
* Payload limit and permission hardening tests.
18061759
*/

0 commit comments

Comments
 (0)