silverstripe-framework/tests/php/Forms/GridField/GridFieldDetailFormTest/ArrayDataWithID.php
Guy Sartorelli 7073246a37
MNT Add tests for using GridField with arbitrary data
Note that the main tests are added as behat tests in the admin module
2023-12-18 14:20:33 +13:00

16 lines
329 B
PHP

<?php
namespace SilverStripe\Forms\Tests\GridField\GridFieldDetailFormTest;
use SilverStripe\Dev\TestOnly;
use SilverStripe\View\ArrayData;
class ArrayDataWithID extends ArrayData implements TestOnly
{
public function __construct($value = [])
{
$value['ID'] ??= 0;
parent::__construct($value);
}
}