mirror of
https://github.com/DirectoryLister/DirectoryLister.git
synced 2025-08-24 06:33:42 +02:00
Added ViewFunctionTest
This commit is contained in:
20
tests/ViewFunctions/ViewFunctionTest.php
Normal file
20
tests/ViewFunctions/ViewFunctionTest.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\ViewFunctions;
|
||||
|
||||
use App\ViewFunctions\ViewFunction;
|
||||
use Tests\TestCase;
|
||||
|
||||
/** @covers \App\ViewFunctions\ViewFunction */
|
||||
class ViewFunctionTest extends TestCase
|
||||
{
|
||||
public function test_it_can_be_extended(): void
|
||||
{
|
||||
$viewFunction = new class extends ViewFunction {
|
||||
protected $name = 'foo';
|
||||
};
|
||||
|
||||
$this->assertInstanceOf(ViewFunction::class, $viewFunction);
|
||||
$this->assertEquals('foo', $viewFunction->name());
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user