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