From ecaae380deefc98b24796e346d4b1af58615d2ea Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Mon, 27 Jun 2022 16:55:02 -0700 Subject: [PATCH] WorkflowMessageTest - Re-enable skipped test. This is a follow-up to #23811 (409b1e0c30d28179f6244c1f180838a473d7582c). The prior commit changed the way it found examples - and caused it to skip some examples. This re-enables the example and adds an assertion to ensure that it actually finds some examples. --- tests/phpunit/api/v4/Entity/WorkflowMessageTest.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/phpunit/api/v4/Entity/WorkflowMessageTest.php b/tests/phpunit/api/v4/Entity/WorkflowMessageTest.php index 162379d0cc..cdb6bd92a5 100644 --- a/tests/phpunit/api/v4/Entity/WorkflowMessageTest.php +++ b/tests/phpunit/api/v4/Entity/WorkflowMessageTest.php @@ -66,11 +66,16 @@ class WorkflowMessageTest extends Api4TestBase implements TransactionalInterface $this->assertRegExp('/The role is myrole./', $result['text']); } + public function testRenderExamplesBaseline() { + $examples = $this->getRenderExamples(); + $this->assertTrue(isset($examples['workflow/contribution_recurring_edit/AlexCancelled'])); + } + public function getRenderExamples(): array { $metas = \Civi\Test::examples()->getMetas(); $results = []; foreach ($metas as $name => $meta) { - if (empty($meta['workflow'])) { + if (!empty($meta['data']['workflow'])) { continue; } if (empty($meta['tags']) || !in_array('phpunit', $meta['tags'])) { -- 2.25.1