Changeset 48937 for trunk/tests/phpunit/tests/blocks/block.php
- Timestamp:
- 09/02/2020 12:35:36 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/blocks/block.php
r48845 r48937 58 58 59 59 $this->assertSame( $parsed_block, $block->parsed_block ); 60 $this->assert Equals( $parsed_block['blockName'], $block->name );61 $this->assert Equals( $parsed_block['attrs'], $block->attributes );62 $this->assert Equals( $parsed_block['innerContent'], $block->inner_content );63 $this->assert Equals( $parsed_block['innerHTML'], $block->inner_html );60 $this->assertSame( $parsed_block['blockName'], $block->name ); 61 $this->assertSame( $parsed_block['attrs'], $block->attributes ); 62 $this->assertSame( $parsed_block['innerContent'], $block->inner_content ); 63 $this->assertSame( $parsed_block['innerHTML'], $block->inner_html ); 64 64 } 65 65 … … 83 83 84 84 $this->assertInstanceOf( WP_Block_Type::class, $block->block_type ); 85 $this->assert Equals(85 $this->assertSame( 86 86 $block_type_settings['attributes'], 87 87 $block->block_type->attributes … … 114 114 $block = new WP_Block( $parsed_block, $context, $this->registry ); 115 115 116 $this->assertEquals( 117 array( 116 $this->assertSame( 117 array( 118 'explicit' => 20, 118 119 'defaulted' => 10, 119 'explicit' => 20,120 120 ), 121 121 $block->attributes … … 146 146 $block = new WP_Block( $parsed_block, $context, $this->registry ); 147 147 148 $this->assert Equals( array( 'defaulted' => 10 ), $block->attributes );148 $this->assertSame( array( 'defaulted' => 10 ), $block->attributes ); 149 149 // Intentionally call a second time, to ensure property was assigned. 150 $this->assert Equals( array( 'defaulted' => 10 ), $block->attributes );150 $this->assertSame( array( 'defaulted' => 10 ), $block->attributes ); 151 151 } 152 152 … … 169 169 $block = new WP_Block( $parsed_block, $context, $this->registry ); 170 170 171 $this->assert Equals( array( 'requested' => 'included' ), $block->context );171 $this->assertSame( array( 'requested' => 'included' ), $block->context ); 172 172 } 173 173 … … 185 185 $this->assertCount( 1, $block->inner_blocks ); 186 186 $this->assertInstanceOf( WP_Block::class, $block->inner_blocks[0] ); 187 $this->assert Equals( 'core/example', $block->inner_blocks[0]->name );187 $this->assertSame( 'core/example', $block->inner_blocks[0]->name ); 188 188 } 189 189 … … 218 218 219 219 $this->assertCount( 0, $block->context ); 220 $this->assert Equals(220 $this->assertSame( 221 221 array( 'core/recordId' => 10 ), 222 222 $block->inner_blocks[0]->context … … 254 254 $block = new WP_Block( $parsed_block, $context, $this->registry ); 255 255 256 $this->assert Equals(256 $this->assertSame( 257 257 array( 'core/value' => 'original' ), 258 258 $block->context 259 259 ); 260 $this->assert Equals(260 $this->assertSame( 261 261 array( 'core/value' => 'merged' ), 262 262 $block->inner_blocks[0]->context 263 263 ); 264 $this->assert Equals(264 $this->assertSame( 265 265 array( 'core/value' => null ), 266 266 $block->inner_blocks[0]->inner_blocks[0]->context
Note: See TracChangeset
for help on using the changeset viewer.