📁 File Manager Pro
v10.0.3 | PHP: 8.2.31
Server: LiteSpeed
2026-07-03 04:06:16
📂
/ (Root)
/
home
/
orkouolp
/
web
/
testing.orkobd
/
laravel
/
vendor
/
phpunit
/
php-text-template
/
tests
📍 /home/orkouolp/web/testing.orkobd/laravel/vendor/phpunit/php-text-template/tests
🔄 Refresh
✏️
Editing: TemplateTest.php
Writable
<?php declare(strict_types=1); /* * This file is part of phpunit/php-text-template. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace SebastianBergmann\Template; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\Small; use PHPUnit\Framework\TestCase; #[CoversClass(Template::class)] #[Small] final class TemplateTest extends TestCase { public function testRendersFromGivenTemplateFileToString(): void { $template = new Template(__DIR__ . '/_fixture/one.txt'); $template->setVar( [ 'foo' => 'baz', 'bar' => 'barbara', ], ); $this->assertSame("baz barbara\n", $template->render()); } public function testRendersFromFallbackTemplateFileToString(): void { $template = new Template(__DIR__ . '/_fixture/two.txt'); $template->setVar( [ 'foo' => 'baz', 'bar' => 'barbara', ], ); $this->assertSame("baz barbara\n", $template->render()); } public function testVariablesCanBeMerged(): void { $template = new Template(__DIR__ . '/_fixture/one.txt'); $template->setVar( [ 'foo' => 'baz', ], ); $template->setVar( [ 'bar' => 'barbara', ], ); $this->assertSame("baz barbara\n", $template->render()); } public function testCannotRenderTemplateThatDoesNotExist(): void { $this->expectException(InvalidArgumentException::class); new Template('does_not_exist.html'); } }
💾 Save Changes
❌ Cancel