Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Apply suggestions from code review
Co-authored-by: Peter Wilson <[email protected]>
  • Loading branch information
gziolo and peterwilsoncc authored Apr 25, 2022
commit 33343ade3aca68ed616b5d9e90d4c30407d32f29
2 changes: 1 addition & 1 deletion tests/phpunit/tests/blocks/wpBlock.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public function test_constructor_assigns_block_type_from_registry() {
$block = new WP_Block( $parsed_block, $context, $this->registry );

$this->assertInstanceOf( WP_Block_Type::class, $block->block_type );
$this->assertSame(
$this->assertSameSetsWithIndex(
array(
'defaulted' => array(
'type' => 'number',
Expand Down
8 changes: 6 additions & 2 deletions tests/phpunit/tests/blocks/wpBlockType.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,14 @@ public function test_set_props() {
$this->assertSame( $args['foo'], $block_type->foo );
}

/*
* @ticket 55567
* @covers WP_Block_Type::set_props
*/
public function test_core_attributes() {
$block_type = new WP_Block_Type( 'core/fake', array() );

$this->assertEquals(
$this->assertSameSetsWithIndex(
array(
'lock' => array( 'type' => 'object' ),
),
Expand All @@ -108,7 +112,7 @@ public function test_core_attributes_matches_custom() {
);

// Backward compatibility: Don't override attributes with the same name.
$this->assertEquals(
$this->assertSameSetsWithIndex(
array(
'lock' => array( 'type' => 'string' ),
),
Expand Down
4 changes: 2 additions & 2 deletions tests/phpunit/tests/rest-api/rest-block-type-controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ public function test_get_item_invalid() {
$this->assertNull( $data['editor_style'] );
$this->assertNull( $data['style'] );
$this->assertSameSets( array(), $data['provides_context'] );
$this->assertSameSets(
$this->assertSameSetsWithIndex(
array(
'lock' => array( 'type' => 'object' ),
),
Expand Down Expand Up @@ -304,7 +304,7 @@ public function test_get_item_defaults() {
$this->assertNull( $data['view_script'] );
$this->assertNull( $data['editor_style'] );
$this->assertNull( $data['style'] );
$this->assertSameSets(
$this->assertSameSetsWithIndex(
array(
'lock' => array( 'type' => 'object' ),
),
Expand Down