Skip to content
This repository has been archived by the owner on Sep 20, 2022. It is now read-only.

Commit

Permalink
CI: fix tests against latest Nette Application
Browse files Browse the repository at this point in the history
  • Loading branch information
xificurk committed Apr 23, 2022
1 parent 2620bd8 commit a8cfaec
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
11 changes: 11 additions & 0 deletions tests/Bridges/TemplateFactoryDI/Fixtures/FooControl.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php
declare(strict_types = 1);

namespace NepadaTests\Bridges\TemplateFactoryDI\Fixtures;

use Nette\Application\UI\Control;

final class FooControl extends Control
{

}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ namespace NepadaTests\Bridges\TemplateFactoryDI;

use Latte\Loaders\StringLoader;
use Nepada\TemplateFactory\TemplateConfigurator;
use NepadaTests\Bridges\TemplateFactoryDI\Fixtures\FooControl;
use NepadaTests\Bridges\TemplateFactoryDI\Fixtures\MockTranslatorFactory;
use NepadaTests\Environment;
use NepadaTests\TestCase;
Expand All @@ -29,8 +30,9 @@ class TemplateFactoryExtensionTest extends TestCase

public function testTemplate(): void
{
$control = new FooControl();
/** @var Nette\Bridges\ApplicationLatte\Template $template */
$template = $this->container->getByType(Nette\Application\UI\ITemplateFactory::class)->createTemplate();
$template = $this->container->getByType(Nette\Application\UI\ITemplateFactory::class)->createTemplate($control);
$template->getLatte()->setLoader(new StringLoader());

// parameters
Expand Down

0 comments on commit a8cfaec

Please sign in to comment.