You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$this->assertCount( 2, $inner_block['innerBlocks'], 'There should be two inner blocks (column).' );
269
+
$this->assertNotEmpty( $inner_block['clientId'], 'The clientId should be set.' );
270
+
$this->assertArrayNotHasKey( 'parentClientId', $resolved_blocks[0], 'The parentClientId should only be set when flattening.' ); // @todo This is incorrect, the parentClientId should be set for nested blocks.
$this->assertNotEmpty( $inner_inner_block['clientId'], 'The clientId should be set.' );
277
+
$this->assertArrayNotHasKey( 'parentClientId', $resolved_blocks[0], 'The parentClientId should only be set when flattening.' ); // @todo This is incorrect, the parentClientId should be set for nested blocks.
$this->assertNotEmpty( $resolved_blocks[2]['clientId'], 'The clientId should be set.' );
302
+
$this->assertEquals( $expected_parent_client_id, $resolved_blocks[2]['parentClientId'], 'The parentClientId should match.' );
303
+
$this->assertEqualBlocks( $expected_blocks[0]['innerBlocks'][0]['innerBlocks'][0], $resolved_blocks[2], 'The first inner inner block should match.' );
304
+
305
+
$this->assertNotEmpty( $resolved_blocks[3]['clientId'], 'The clientId should be set.' );
306
+
$this->assertEquals( $expected_parent_client_id, $resolved_blocks[3]['parentClientId'], 'The parentClientId should match.' );
307
+
$this->assertEqualBlocks( $expected_blocks[0]['innerBlocks'][0]['innerBlocks'][1], $resolved_blocks[3], 'The second inner inner block should match.' );
$this->assertNotEmpty( $resolved_blocks[5]['clientId'], 'The clientId should be set.' );
318
+
$this->assertEquals( $expected_parent_client_id, $resolved_blocks[5]['parentClientId'], 'The parentClientId should match.' );
319
+
$this->assertEqualBlocks( $expected_blocks[0]['innerBlocks'][1]['innerBlocks'][0], $resolved_blocks[5], 'The first inner inner block should match.' );
320
+
321
+
$this->assertNotEmpty( $resolved_blocks[6]['clientId'], 'The clientId should be set.' );
322
+
$this->assertEquals( $expected_parent_client_id, $resolved_blocks[6]['parentClientId'], 'The parentClientId should match.' );
323
+
$this->assertEqualBlocks( $expected_blocks[0]['innerBlocks'][1]['innerBlocks'][1], $resolved_blocks[6], 'The second inner inner block should match.' );
324
+
}
325
+
326
+
/**
327
+
* Asserts two blocks are equal, ignoring clientId and parentClientId.
328
+
*
329
+
* @param array<string,mixed> $expected The expected block.
330
+
* @param array<string,mixed> $actual The actual block.
331
+
* @param string $message The message to display if the assertion fails.
0 commit comments