Skip to content

Commit

Permalink
tests: renamed some files
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Nov 27, 2022
1 parent af4dbb2 commit dd9878e
Show file tree
Hide file tree
Showing 118 changed files with 71 additions and 71 deletions.
2 changes: 1 addition & 1 deletion tests/common/Compiler.recursiveMacro.phpt
Expand Up @@ -29,6 +29,6 @@ $template = <<<'EOD'
EOD;

Assert::matchFile(
__DIR__ . '/expected/Compiler.recursive.macro.phtml',
__DIR__ . '/expected/Compiler.recursive.macro.php',
$latte->compile($template)
);
2 changes: 1 addition & 1 deletion tests/common/Compiler.unquoted.phpt
Expand Up @@ -31,7 +31,7 @@ $template = <<<'EOD'
EOD;

Assert::matchFile(
__DIR__ . '/expected/Compiler.unquoted.attrs.phtml',
__DIR__ . '/expected/Compiler.unquoted.attrs.php',
$latte->compile($template)
);
Assert::matchFile(
Expand Down
4 changes: 2 additions & 2 deletions tests/common/PhpHelpers.reformatCode().phpt
Expand Up @@ -13,8 +13,8 @@ use Tester\Assert;
require __DIR__ . '/../bootstrap.php';


$input = file_get_contents(__DIR__ . '/templates/PhpHelpers.reformatCode().phtml');
$expected = file_get_contents(__DIR__ . '/expected/PhpHelpers.reformatCode().phtml');
$input = file_get_contents(__DIR__ . '/templates/PhpHelpers.reformatCode().php');
$expected = file_get_contents(__DIR__ . '/expected/PhpHelpers.reformatCode().php');
Assert::match($expected, PhpHelpers::reformatCode($input));

Assert::match('<?php echo "<?xml" ?>', PhpHelpers::reformatCode('<?php echo "<?xml" ?>'));
Expand Down
2 changes: 1 addition & 1 deletion tests/common/contentType.ical.phpt
Expand Up @@ -35,7 +35,7 @@ END:VCALENDAR
EOD;

Assert::matchFile(
__DIR__ . '/expected/contentType.ical.phtml',
__DIR__ . '/expected/contentType.ical.php',
$latte->compile($template)
);
Assert::matchFile(
Expand Down
2 changes: 1 addition & 1 deletion tests/common/contentType.xml.phpt
Expand Up @@ -28,7 +28,7 @@ $params['xss'] = 'some&<>"\'/chars';
$params['mxss'] = '`mxss';

Assert::matchFile(
__DIR__ . '/expected/contentType.xml.phtml',
__DIR__ . '/expected/contentType.xml.php',
$latte->compile(__DIR__ . '/templates/contentType.xml.latte')
);
Assert::matchFile(
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion tests/filters/general.phpt
Expand Up @@ -76,7 +76,7 @@ $params['hello'] = 'Hello World';
$params['date'] = strtotime('2008-01-02');

Assert::matchFile(
__DIR__ . '/expected/general.phtml',
__DIR__ . '/expected/general.php',
$latte->compile(__DIR__ . '/templates/general.latte')
);
Assert::matchFile(
Expand Down
22 changes: 11 additions & 11 deletions tests/sandbox/code.phpt
Expand Up @@ -26,7 +26,7 @@ vars
EOD;

Assert::matchFile(
__DIR__ . '/expected/code.vars.phtml',
__DIR__ . '/expected/code.vars.php',
$latte->compile($template)
);

Expand All @@ -48,7 +48,7 @@ functions
EOD;

Assert::matchFile(
__DIR__ . '/expected/code.functions.phtml',
__DIR__ . '/expected/code.functions.php',
$latte->compile($template)
);

Expand All @@ -65,7 +65,7 @@ callbacks
EOD;

Assert::matchFile(
__DIR__ . '/expected/code.callbacks.phtml',
__DIR__ . '/expected/code.callbacks.php',
$latte->compile($template)
);

Expand All @@ -83,7 +83,7 @@ static methods
EOD;

Assert::matchFile(
__DIR__ . '/expected/code.static.methods.phtml',
__DIR__ . '/expected/code.static.methods.php',
$latte->compile($template)
);

Expand All @@ -100,7 +100,7 @@ static props
EOD;

Assert::matchFile(
__DIR__ . '/expected/code.static.props.phtml',
__DIR__ . '/expected/code.static.props.php',
$latte->compile($template)
);

Expand All @@ -119,7 +119,7 @@ consts
EOD;

Assert::matchFile(
__DIR__ . '/expected/code.consts.phtml',
__DIR__ . '/expected/code.consts.php',
$latte->compile($template)
);

Expand All @@ -139,7 +139,7 @@ object methods
EOD;

Assert::matchFile(
__DIR__ . '/expected/code.object.methods.phtml',
__DIR__ . '/expected/code.object.methods.php',
$latte->compile($template)
);

Expand Down Expand Up @@ -169,7 +169,7 @@ props
EOD;

Assert::matchFile(
__DIR__ . '/expected/code.props.phtml',
__DIR__ . '/expected/code.props.php',
$latte->compile($template)
);

Expand All @@ -184,7 +184,7 @@ read-write
EOD;

Assert::matchFile(
__DIR__ . '/expected/code.read-write.phtml',
__DIR__ . '/expected/code.read-write.php',
$latte->compile($template)
);

Expand All @@ -200,7 +200,7 @@ EOD;

Assert::matchFile(
PHP_VERSION_ID >= 80000
? __DIR__ . '/expected/code.optional-chaining.80.phtml'
: __DIR__ . '/expected/code.optional-chaining.phtml',
? __DIR__ . '/expected/code.optional-chaining.80.php'
: __DIR__ . '/expected/code.optional-chaining.php',
$latte->compile($template)
);
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion tests/tags/block.breaking.phpt
Expand Up @@ -27,7 +27,7 @@ $template = <<<'XX'
XX;

Assert::matchFile(
__DIR__ . '/expected/block.breaking.phtml',
__DIR__ . '/expected/block.breaking.php',
$latte->compile($template)
);
Assert::match(
Expand Down
2 changes: 1 addition & 1 deletion tests/tags/block.dynamic.phpt
Expand Up @@ -43,7 +43,7 @@ $template = <<<'EOD'
EOD;

Assert::matchFile(
__DIR__ . '/expected/block.dynamic.phtml',
__DIR__ . '/expected/block.dynamic.php',
$latte->compile($template)
);
Assert::matchFile(
Expand Down
2 changes: 1 addition & 1 deletion tests/tags/block.local.dynamic.phpt
Expand Up @@ -44,7 +44,7 @@ $template = <<<'EOD'
EOD;

Assert::matchFile(
__DIR__ . '/expected/block.local.dynamic.phtml',
__DIR__ . '/expected/block.local.dynamic.php',
$latte->compile($template)
);
Assert::matchFile(
Expand Down
2 changes: 1 addition & 1 deletion tests/tags/block.vars.phpt
Expand Up @@ -51,7 +51,7 @@ $template = <<<'XX'
XX;

Assert::matchFile(
__DIR__ . '/expected/block.vars.phtml',
__DIR__ . '/expected/block.vars.php',
$latte->compile($template)
);
Assert::matchFile(
Expand Down
12 changes: 6 additions & 6 deletions tests/tags/define.args.phpt
Expand Up @@ -35,7 +35,7 @@ d) {include test null}
XX;

Assert::matchFile(
__DIR__ . '/expected/define.args1.phtml',
__DIR__ . '/expected/define.args1.php',
$latte->compile($template)
);
Assert::matchFile(
Expand All @@ -53,7 +53,7 @@ $template = <<<'XX'
XX;

Assert::matchFile(
__DIR__ . '/expected/define.typehints.phtml',
__DIR__ . '/expected/define.typehints.php',
$latte->compile($template)
);

Expand All @@ -76,7 +76,7 @@ d) {include test, var2 => 1, 2} // invalid
XX;

Assert::matchFile(
__DIR__ . '/expected/define.args2.phtml',
__DIR__ . '/expected/define.args2.php',
$latte->compile($template)
);
Assert::matchFile(
Expand All @@ -101,7 +101,7 @@ c) {include test, hello => 1}
XX;

Assert::matchFile(
__DIR__ . '/expected/define.args3.phtml',
__DIR__ . '/expected/define.args3.php',
$latte->compile($template)
);

Expand All @@ -126,7 +126,7 @@ c) {include test, hello => 1}',
]));

Assert::matchFile(
__DIR__ . '/expected/define.args4.phtml',
__DIR__ . '/expected/define.args4.php',
$latte->compile('main')
);
Assert::matchFile(
Expand All @@ -150,7 +150,7 @@ b) {include test, var1 => 1}
XX;

Assert::matchFile(
__DIR__ . '/expected/define.args5.phtml',
__DIR__ . '/expected/define.args5.php',
$latte->compile($template)
);
Assert::matchFile(
Expand Down
2 changes: 1 addition & 1 deletion tests/tags/define.phpt
Expand Up @@ -29,7 +29,7 @@ $template = <<<'XX'
XX;

Assert::matchFile(
__DIR__ . '/expected/define.phtml',
__DIR__ . '/expected/define.php',
$latte->compile($template)
);
Assert::matchFile(
Expand Down
2 changes: 1 addition & 1 deletion tests/tags/embed.block.phpt
Expand Up @@ -365,6 +365,6 @@ $latte->setLoader(new Latte\Loaders\StringLoader([
]));

Assert::matchFile(
__DIR__ . '/expected/embed.block.phtml',
__DIR__ . '/expected/embed.block.php',
$latte->compile('main')
);
2 changes: 1 addition & 1 deletion tests/tags/embed.file.phpt
Expand Up @@ -739,6 +739,6 @@ $latte->setLoader(new Latte\Loaders\StringLoader([
]));

Assert::matchFile(
__DIR__ . '/expected/embed.file.phtml',
__DIR__ . '/expected/embed.file.php',
$latte->compile('main')
);
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion tests/tags/extends.1.phpt
Expand Up @@ -26,7 +26,7 @@ EOD
]));

Assert::matchFile(
__DIR__ . '/expected/extends.1.phtml',
__DIR__ . '/expected/extends.1.php',
$latte->compile('main')
);
Assert::same(
Expand Down
2 changes: 1 addition & 1 deletion tests/tags/extends.4.phpt
Expand Up @@ -27,7 +27,7 @@ $latte->setLoader(new Latte\Loaders\StringLoader([
]));

Assert::matchFile(
__DIR__ . '/expected/extends.4.phtml',
__DIR__ . '/expected/extends.4.php',
$latte->compile('main')
);
Assert::matchFile(
Expand Down
2 changes: 1 addition & 1 deletion tests/tags/extendsCheck.phpt
Expand Up @@ -23,6 +23,6 @@ content
';

Assert::matchFile(
__DIR__ . '/expected/extendsCheck.phtml',
__DIR__ . '/expected/extendsCheck.php',
$latte->compile($template)
);
2 changes: 1 addition & 1 deletion tests/tags/first-sep-last.phpt
Expand Up @@ -44,7 +44,7 @@ $template = <<<'EOD'
EOD;

Assert::matchFile(
__DIR__ . '/expected/first-sep-last.phtml',
__DIR__ . '/expected/first-sep-last.php',
$latte->compile($template)
);
Assert::matchFile(
Expand Down
2 changes: 1 addition & 1 deletion tests/tags/for.phpt
Expand Up @@ -41,6 +41,6 @@ $template = <<<'EOD'
EOD;

Assert::matchFile(
__DIR__ . '/expected/for.phtml',
__DIR__ . '/expected/for.php',
$latte->compile($template)
);
4 changes: 2 additions & 2 deletions tests/tags/foreach.breaking.phpt
Expand Up @@ -53,7 +53,7 @@ $template = <<<'EOD'
EOD;

Assert::matchFile(
__DIR__ . '/expected/foreach.breaking.phtml',
__DIR__ . '/expected/foreach.breaking.php',
$latte->compile($template)
);

Expand Down Expand Up @@ -105,7 +105,7 @@ $template = <<<'EOD'
EOD;

Assert::matchFile(
__DIR__ . '/expected/foreach.breaking.attr.phtml',
__DIR__ . '/expected/foreach.breaking.attr.php',
$latte->compile($template)
);

Expand Down
2 changes: 1 addition & 1 deletion tests/tags/foreach.else.phpt
Expand Up @@ -17,7 +17,7 @@ $latte->setLoader(new Latte\Loaders\StringLoader);


Assert::matchFile(
__DIR__ . '/expected/foreach.else.phtml',
__DIR__ . '/expected/foreach.else.php',
$latte->compile('
{foreach [a] as $item}
item
Expand Down
2 changes: 1 addition & 1 deletion tests/tags/foreach2.phpt
Expand Up @@ -31,7 +31,7 @@ $template = <<<'EOD'
EOD;

Assert::matchFile(
__DIR__ . '/expected/foreach2.phtml',
__DIR__ . '/expected/foreach2.php',
$latte->compile($template)
);

Expand Down
2 changes: 1 addition & 1 deletion tests/tags/general.html.phpt
Expand Up @@ -26,7 +26,7 @@ $params['el'] = new Html("<div title='1/2\"'></div>");
$params['el2'] = Nette\Utils\Html::el('span', ['title' => '/"'])->setText('foo');

Assert::matchFile(
__DIR__ . '/expected/general.html.phtml',
__DIR__ . '/expected/general.html.php',
$latte->compile(__DIR__ . '/templates/general.latte')
);
Assert::matchFile(
Expand Down
2 changes: 1 addition & 1 deletion tests/tags/general.n-attributes.phpt
Expand Up @@ -17,7 +17,7 @@ $latte = new Latte\Engine;
$params['people'] = ['John', 'Mary', 'Paul'];

Assert::matchFile(
__DIR__ . '/expected/general.n-attributes.phtml',
__DIR__ . '/expected/general.n-attributes.php',
$latte->compile(__DIR__ . '/templates/n-attributes.latte')
);
Assert::matchFile(
Expand Down
2 changes: 1 addition & 1 deletion tests/tags/general.xhtml.phpt
Expand Up @@ -27,7 +27,7 @@ $params['el'] = new Html("<div title='1/2\"'></div>");
$params['el2'] = Nette\Utils\Html::el('span', ['title' => '/"'])->setText('foo');

Assert::matchFile(
__DIR__ . '/expected/general.xhtml.phtml',
__DIR__ . '/expected/general.xhtml.php',
$latte->compile(__DIR__ . '/templates/general.latte')
);
Assert::matchFile(
Expand Down
2 changes: 1 addition & 1 deletion tests/tags/if.phpt
Expand Up @@ -56,7 +56,7 @@ $template = <<<'EOD'
EOD;

Assert::matchFile(
__DIR__ . '/expected/if.phtml',
__DIR__ . '/expected/if.php',
$latte->compile($template)
);

Expand Down
2 changes: 1 addition & 1 deletion tests/tags/ifchanged.phpt
Expand Up @@ -42,7 +42,7 @@ $template = <<<'EOD'
EOD;

Assert::matchFile(
__DIR__ . '/expected/ifchanged.phtml',
__DIR__ . '/expected/ifchanged.php',
$latte->compile($template)
);

Expand Down
2 changes: 1 addition & 1 deletion tests/tags/import.phpt
Expand Up @@ -31,7 +31,7 @@ $latte->setLoader(new Latte\Loaders\StringLoader([
]));

Assert::matchFile(
__DIR__ . '/expected/import.phtml',
__DIR__ . '/expected/import.php',
$latte->compile('main')
);
Assert::match(
Expand Down

0 comments on commit dd9878e

Please sign in to comment.