From e3e66684498fda6bc84b4725ebce8d42c6512cf2 Mon Sep 17 00:00:00 2001 From: Evan Herman Date: Mon, 24 Jun 2024 15:51:05 -0400 Subject: [PATCH] Update unit test --- .dev/tests/phpunit/src/blocks/gist/test-index.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.dev/tests/phpunit/src/blocks/gist/test-index.php b/.dev/tests/phpunit/src/blocks/gist/test-index.php index b383df0d3b9..4813003270e 100644 --- a/.dev/tests/phpunit/src/blocks/gist/test-index.php +++ b/.dev/tests/phpunit/src/blocks/gist/test-index.php @@ -28,7 +28,7 @@ public function test_coblocks_block_gist_handler_returns_empty_string_without_pr $this->assertSame( coblocks_block_gist_handler( array( 'http://godaddy.com' ) ), '' ); $this->assertSame( coblocks_block_gist_handler( array( 'https://gist.github.com' ) ), '' ); - $this->assertNotEmpty( + $this->assertEmpty( coblocks_block_gist_handler( array( 'https://gist.github.com/someuser/a04f4e14e3cd3b6d48157ea0706114f7', @@ -42,12 +42,12 @@ public function test_coblocks_block_gist_handler_returns_empty_string_without_pr * Test that the embed handler returns the proper Gist embed code. */ public function test_coblocks_block_gist_handler_returns_valid_embed() { - $gist_url = 'https://gist.github.com/someuser/a04f4e14e3cd3b6d48157ea0706114f7'; - $gist_path = 'someuser/a04f4e14e3cd3b6d48157ea0706114f7'; + $gist_url = 'https://gist.github.com/EvanHerman/3e8058a093800e1b7c8b605a64525514'; + $gist_path = 'EvanHerman/3e8058a093800e1b7c8b605a64525514'; - $this->assertEquals( - coblocks_block_gist_handler( array( $gist_url, $gist_path ) ), - "\nView this gist on GitHub" + $this->assertMatchesRegularExpression( + "/