Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>
  • Loading branch information
crynobone committed Dec 15, 2024
1 parent e7f71d6 commit 06276d3
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion tests/Support/FluentDecoratorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

namespace Orchestra\Testbench\Tests\Support;

use PHPUnit\Framework\TestCase;
use Illuminate\Foundation\Application;
use Orchestra\Testbench\Support\FluentDecorator;
use PHPUnit\Framework\TestCase;

class FluentDecoratorTest extends TestCase
{
Expand All @@ -27,5 +28,17 @@ public function it_can_be_utilise_fluent_features()
$this->assertSame($attributes, $fluent->toArray());
$this->assertSame(json_encode($attributes), $fluent->toJson());
$this->assertSame($attributes, $fluent->jsonSerialize());

$this->assertFalse(isset($fluent['laravel']));
$this->assertFalse(isset($fluent->laravel));
$this->assertNull($fluent['laravel']);
$this->assertNull($fluent->laravel);

$this->assertInstanceOf(FluentDecorator::class, $fluent->laravel(Application::VERSION));

$this->assertTrue(isset($fluent['laravel']));
$this->assertTrue(isset($fluent->laravel));
$this->assertSame(Application::VERSION, $fluent['laravel']);
$this->assertSame(Application::VERSION, $fluent->laravel);
}
}

0 comments on commit 06276d3

Please sign in to comment.