assertSame( $expected, $actual ); } function data_serialize_identity_from_parsed() { return array( // Void block. array( '' ), // Freeform content ($block_name = null). array( 'Example.' ), // Block with content. array( 'Example.' ), // Block with attributes. array( '' ), // Block with inner blocks. array( "Example.\n\nExample.\n\n" ), // Block with attribute values that may conflict with HTML comment. array( '' ), ); } function test_serialized_block_name() { $this->assertNull( strip_core_block_namespace( null ) ); $this->assertSame( 'example', strip_core_block_namespace( 'example' ) ); $this->assertSame( 'example', strip_core_block_namespace( 'core/example' ) ); $this->assertSame( 'plugin/example', strip_core_block_namespace( 'plugin/example' ) ); } }