mirror of
https://github.com/flarum/framework.git
synced 2025-02-01 01:44:00 +08:00
Add test for model object argument in callable for attribute defaults
This commit is contained in:
parent
ad9917f0d6
commit
561e8c6b6a
|
@ -277,7 +277,7 @@ class ModelTest extends TestCase
|
|||
{
|
||||
$this->extend(
|
||||
(new Extend\Model(Group::class))
|
||||
->default('counter', function () {
|
||||
->default('counter', function (Group $group) {
|
||||
static $counter = 0;
|
||||
|
||||
return ++$counter;
|
||||
|
|
Loading…
Reference in New Issue
Block a user