Skip to content

Commit 17c3605

Browse files
committed
Added get computed location test to model-code command test
1 parent 4e86d0d commit 17c3605

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

tests/src/Commands/ModelCode.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,23 @@ public static function getLatLngAttributes(): array
146146
}'));
147147
});
148148

149+
it ('outputs the get computed location model-code', function () {
150+
$this->artisan(
151+
'filament-google-maps:model-code',
152+
[
153+
'model' => 'Cheesegrits/FilamentGoogleMaps/Tests/Models/LocationFillable',
154+
'--lat' => 'lat',
155+
'--lng' => 'lng',
156+
'--location' => 'location',
157+
]
158+
)
159+
->expectsOutputToContain(convertNewlines('
160+
public static function getComputedLocation(): string
161+
{
162+
return \'location\';
163+
}'));
164+
});
165+
149166
function convertNewlines($text)
150167
{
151168
$text = implode("\n", explode("\r\n", $text));

0 commit comments

Comments
 (0)