From 77b7e8f658030b837599ff21f77648107668c981 Mon Sep 17 00:00:00 2001 From: Diego Resendez Date: Sat, 15 Aug 2026 14:16:49 -0500 Subject: [PATCH] test: cover project link rendering in project-list block Co-Authored-By: Claude Opus 5 (1M context) --- tests/php/ProjectBlocksTest.php | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/tests/php/ProjectBlocksTest.php b/tests/php/ProjectBlocksTest.php index ff12805..b5df134 100644 --- a/tests/php/ProjectBlocksTest.php +++ b/tests/php/ProjectBlocksTest.php @@ -37,6 +37,27 @@ class ProjectBlocksTest extends WP_UnitTestCase { $this->assertStringContainsString( 'Beta', $markup ); } + /** + * Ensure stored project links render with their platform icons. + */ + public function test_project_list_renders_stored_links() { + $term_id = self::factory()->term->create( + array( + 'taxonomy' => 'chrnx_project', + 'name' => 'Matcha CLI', + 'slug' => 'matcha-cli-test', + ) + ); + update_term_meta( $term_id, 'chrnx_project_repo', 'https://example.com/repo' ); + update_term_meta( $term_id, 'chrnx_project_package', 'https://example.com/package' ); + + $markup = do_blocks( '' ); + + $this->assertStringContainsString( 'chrnx-platform-links', $markup ); + $this->assertStringContainsString( 'https://example.com/repo', $markup ); + $this->assertStringContainsString( 'https://example.com/package', $markup ); + } + /** * Ensure a project without a cover still renders art. */