', $form->html);
$this->assertSame(5, substr_count($form->html, '
assertSame(5, substr_count($form->html, '
'));
preg_match('/
(.*?)<\/div>/s', $form->html, $xmlMatch);
$this->assertNotEmpty($xmlMatch[1]);
$decodedXml = base64_decode(trim($xmlMatch[1]), true);
$this->assertNotFalse($decodedXml);
$this->assertStringContainsString('name="Read docs"', $decodedXml);
preg_match('/
(.*?)<\/div>/s', $form->html, $linkMatch);
$this->assertNotEmpty($linkMatch[1]);
$decodedLinks = base64_decode(trim($linkMatch[1]), true);
$links = json_decode($decodedLinks, true);
$this->assertArrayHasKey('Task_1', $links);
$this->assertEquals('docs:start', $links['Task_1']['target']);
}
}