Problém s {plink} při testování šablon

AntiCZ
Člen | 11
+
0
-

Ahoj, mám trochu problém při testovaní html výstupu, kde je použit {plink}

		$this->container = $container;
		$presenterFactory = $this->container->getByType('\Nette\Application\IPresenterFactory');
		$this->presenter = $presenterFactory->createPresenter('Tester');
		$this->presenter->autoCanonicalize = false;

		$request = new Nette\Application\Request('Tester');
		$response = $this->presenter->run($request);
		$html = (string) $response->getSource();
		$dom = Tester\DomQuery::fromHtml($html);
		$dom->has('title');

mi Tester vyhodí E_USER_WARNING: Invalid link: No route for Akce:default()

V šabloně je

<a href="{plink Akce:default}">Akce</a>

Není to zaroutované v RouterFactory. Prezenter je Akce a šablona default

Editoval AntiCZ (19. 9. 2017 11:42)

AntiCZ
Člen | 11
+
0
-

Tak problem byl v RouteFactory. Konktretne

Route::$defaultFlags = Route::SECURED;