Add test for model object argument in callable for attribute defaults

This commit is contained in:
Daniël Klabbers 2020-10-07 11:38:52 +02:00
parent ad9917f0d6
commit 561e8c6b6a

View File

@ -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;