Skip to content

Commit

Permalink
Fix for CS
Browse files Browse the repository at this point in the history
  • Loading branch information
carstingaxion committed Oct 1, 2024
1 parent 527b5ce commit 76c237c
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions test/unit/php/includes/core/classes/class-test-block.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,15 +96,15 @@ public function test_register_blocks(): void {
public function test_register_block_variations(): void {
$this->assertFalse(
class_exists( 'GatherPress\Core\Block\Add_To_Calendar' ),
'Failed to assert Add_To_Calendar singelton does not yet exist.'
'Failed to assert Add_To_Calendar singleton does not yet exist.'
);

// Register our block variations.
$instance->register_block_variations();

$this->assertTrue(
class_exists( 'GatherPress\Core\Block\Add_To_Calendar' ),
'Failed to assert Add_To_Calendar singelton does exist.'
'Failed to assert Add_To_Calendar singleton does exist.'
);
}

Expand All @@ -120,7 +120,7 @@ public function test_get_block_variations(): void {

$this->assertSame(
array(
'add-to-calendar'
'add-to-calendar',
),
Utility::invoke_hidden_method( $instance, 'get_block_variations' ),
'Failed to assert, to get all block variations from the "/src" directory.'
Expand Down Expand Up @@ -151,10 +151,9 @@ public function test_get_classname_from_foldername(): void {
* @return void
*/
public function test_register_block_patterns(): void {
$instance = Block::get_instance();
$block_patterns = array(
$instance = Block::get_instance();
$block_patterns = array(
'gatherpress/event-template',
// 'gatherpress/event-details',
'gatherpress/venue-template',
'gatherpress/venue-details',
);
Expand All @@ -177,15 +176,16 @@ public function test_register_block_patterns(): void {
* @return void
*/
public function test_docs_contain_patterns(): void {

$doc_file = file_get_contents( sprintf(
'%s/docs/%s',
GATHERPRESS_CORE_PATH,
'developer/blocks/hookable-patterns/README.md'
) );

$doc_file = file_get_contents( // phpcs:ignore WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents
sprintf(
'%s/docs/%s',
GATHERPRESS_CORE_PATH,
'developer/blocks/hookable-patterns/README.md'
)
);

$this->assertStringContainsString( '`gatherpress/event-template`', $doc_file );
// $this->assertStringContainsString( '`gatherpress/event-details`', $doc_file );
$this->assertStringContainsString( '`gatherpress/venue-template`', $doc_file );
$this->assertStringContainsString( '`gatherpress/venue-details`', $doc_file );
}
Expand Down

0 comments on commit 76c237c

Please sign in to comment.