some cleanup
This commit is contained in:
@@ -23,6 +23,7 @@ RENDER(Request& context)
|
||||
bool exists = component_exists("components/panel");
|
||||
String resolved = component_resolve("components/panel");
|
||||
String panel_markup = component("components/panel", props, context);
|
||||
String alias_markup = component("components/props_alias", props, context);
|
||||
|
||||
ob_start();
|
||||
component_render("components/panel:FOOTER", props, context);
|
||||
@@ -37,12 +38,14 @@ RENDER(Request& context)
|
||||
check("component_exists()", exists, exists ? "components/panel resolved as existing" : "components/panel missing");
|
||||
check("component_resolve()", resolved != "", resolved);
|
||||
check("component()", panel_markup.find("Component Output") != String::npos && panel_markup.find("This body comes from component()") != String::npos, panel_markup);
|
||||
check("COMPONENT(Request& props) alias", alias_markup.find("alias=Component Output") != String::npos && alias_markup.find("body=This body comes from component()") != String::npos, alias_markup);
|
||||
check("component_render() named handler", footer_markup.find("Named footer render") != String::npos, footer_markup);
|
||||
check("ob_start() / ob_get_close()", buffer_markup == "buffered-text", buffer_markup);
|
||||
|
||||
?><div class="tests-section">
|
||||
<h3>Rendered Component</h3>
|
||||
<?: panel_markup ?>
|
||||
<?: alias_markup ?>
|
||||
</div><?
|
||||
|
||||
site_tests_summary(passed, failed, skipped, "The panel fixture under site/tests/components exercises default and named component entry points.");
|
||||
|
||||
Reference in New Issue
Block a user