You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 20, 2018. It is now read-only.
Martin Zlámal edited this page Mar 28, 2016
·
3 revisions
Testing UI\Control render
It can be useful to check if rendered string (or HTML template) contains what you wanted. It can be achieved like this (using match method from Nette\Tester)
use \Testbench\TComponent;
publicfunctiontestComponentRender()
{
$control = new \Component;
$this->checkRenderOutput($control, '<strong>OK%A%'); //match string$this->checkRenderOutput($control, __DIR__ . '/Component.expected'); //match file content
}