Skip to content

Commit

Permalink
lock file refresh
Browse files Browse the repository at this point in the history
  • Loading branch information
ericsizemore committed May 6, 2024
1 parent b57a62d commit aae64cc
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 18 deletions.
20 changes: 10 additions & 10 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions src/Template.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,13 @@
use InvalidArgumentException;
use LogicException;
use RuntimeException;
use Symfony\Component\Cache\Adapter\AdapterInterface;
use Symfony\Component\Cache\Adapter\AbstractAdapter;
use Symfony\Component\Cache\Adapter\AdapterInterface;
use Symfony\Component\Cache\PruneableInterface;

use function array_keys;
use function array_map;
use function array_merge;
use function array_values;
use function file_get_contents;
use function is_file;
Expand Down Expand Up @@ -163,7 +164,7 @@ public function setTplVars(array $tplVars): void
if (\count($tplVars) === 0) {
$this->tplVars = [];
} else {
$this->tplVars = \array_merge($this->tplVars, $tplVars);
$this->tplVars = array_merge($this->tplVars, $tplVars);
}
}
}
12 changes: 6 additions & 6 deletions tests/src/TemplateTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -251,15 +251,15 @@ public function testSetTplVars(): void
], $template->getTplVars());

$template->setTplVars([
'altTitle' => 'Can setTplVars merge?',
'altContent' => 'Test if variables are merged.'
'altTitle' => 'Can setTplVars merge?',
'altContent' => 'Test if variables are merged.',
]);

self::assertSame([
'title' => 'Simple Template Engine Test',
'content' => 'This is a test of the Simple Template Engine class by Eric Sizemore.',
'altTitle' => 'Can setTplVars merge?',
'altContent' => 'Test if variables are merged.'
'title' => 'Simple Template Engine Test',
'content' => 'This is a test of the Simple Template Engine class by Eric Sizemore.',
'altTitle' => 'Can setTplVars merge?',
'altContent' => 'Test if variables are merged.',
], $template->getTplVars());

$template->setTplVars([]);
Expand Down

0 comments on commit aae64cc

Please sign in to comment.