Skip to content

Commit 588d03b

Browse files
committed
add test for column key fluent
1 parent 8e8f3b7 commit 588d03b

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

tests/Unit/CrudPanel/CrudPanelColumnsTest.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -532,4 +532,17 @@ public function testOrderColumnsMixedList()
532532

533533
$this->assertEquals(['column2', 'column1', 'column3'], array_keys($this->crudPanel->columns()));
534534
}
535+
536+
public function testItCanChangeTheColumnKey()
537+
{
538+
539+
$this->crudPanel->column('test');
540+
541+
$this->assertEquals('test', $this->crudPanel->columns()['test']['key']);
542+
543+
$this->crudPanel->column('test')->key('new_key');
544+
545+
$this->assertEquals('new_key', $this->crudPanel->columns()['new_key']['key']);
546+
547+
}
535548
}

0 commit comments

Comments
 (0)