Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision e2da553f

Von Moritz Bunkus vor etwa 12 Jahren hinzugefügt

  • ID e2da553ff383556b6277040b2454a2d06ee70174
  • Vorgänger ec27f677
  • Nachfolger 2d6a42ee

Testcase für SL::Controller::Base::render() gefixt

Unterschiede anzeigen:

t/controllers/base/render.t
layout => SL::Layout::Javascript->new,
};
$::myconfig{stylesheet} = 'javascript';
$::myconfig{menustyle} = 'javascript';
delete @{ $::form }{qw(header footer)};
}
......
# Menu yes/no:
reset_test_env();
stdout_like { $ctrl->render(\'Hallo [% world %]', world => 'Welt') } qr/<table.*class=.*menunew/i, 'HTML header & menu with header=1';
stdout_like { $ctrl->render(\'Hallo [% world %]', world => 'Welt') } qr/<div.*id="main_menu_div".*<ul.*id="main_menu_model"/is, 'HTML header & menu with header=1';
reset_test_env();
stdout_unlike { $ctrl->render(\'Hallo [% world %]', { header => 0 }, world => 'Welt') } qr/<table.*class=.*menunew/i, 'HTML header & menu with header=0';
stdout_unlike { $ctrl->render(\'Hallo [% world %]', { header => 0 }, world => 'Welt') } qr/<div.*id="main_menu_div".*<ul.*id="main_menu_model"/is, 'HTML header & menu with header=0';
reset_test_env();
stdout_unlike { $ctrl->render(\'Hallo [% world %]', { layout => 0 }, world => 'Welt') } qr/<table.*class=.*menunew/i, 'HTML header & menu with layout=0';
stdout_unlike { $ctrl->render(\'Hallo [% world %]', { layout => 0 }, world => 'Welt') } qr/<div.*id="main_menu_div".*<ul.*id="main_menu_model"/is, 'HTML header & menu with layout=0';
done_testing;

Auch abrufbar als: Unified diff