Skip to content

Commit

Permalink
update variable names to camelCase
Browse files Browse the repository at this point in the history
  • Loading branch information
titantwentyone committed Nov 8, 2023
1 parent f7de491 commit a175481
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/src/Tables/ColumnTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@
});

it('can assert that a column exists with the given configuration', function () {
$post_published = Post::factory()->create([
$publishedPost = Post::factory()->create([
'is_published' => true,
]);

Expand All @@ -175,23 +175,23 @@
return $column->isSortable() &&
$column->isSearchable() &&
$column->getPrefix() == 'published';
}, $post_published);
}, $publishedPost);

$post_unpublished = Post::factory()->create([
$unpublishedPost = Post::factory()->create([
'is_published' => false,
]);

livewire(PostsTable::class)
->assertTableColumnExists('title2', function (Filament\Tables\Columns\TextColumn $column) {
return $column->getPrefix() == 'unpublished';
}, $post_unpublished);
}, $unpublishedPost);

$this->expectException('PHPUnit\Framework\ExpectationFailedException');
$this->expectExceptionMessage('Failed asserting that a field with the name [title] and provided configuration exists on the [' . PostsTable::class . '] component');
$this->expectExceptionMessage('Failed asserting that a column with the name [title] and provided configuration exists on the [' . PostsTable::class . '] component');

livewire(PostsTable::class)
->assertTableColumnExists('title', function (Filament\Tables\Columns\TextColumn $column) {
return $column->isTime();
}, $post_published);
}, $publishedPost);

});

0 comments on commit a175481

Please sign in to comment.