is there a way to disable mass assignment protection for all models across all tests without having to duplicate this over and over?
FooTest
Foo::unguard();
Bar::unguard();
Baz::unguard();
Foo::create(['column' => 'value']);
Bar::create(['column' => 'value']);
Baz::create(['column' => 'value']);
BarTest
Foo::unguard();
Bar::unguard();
Baz::unguard();
Foo::create(['column' => 'value']);
Bar::create(['column' => 'value']);
Baz::create(['column' => 'value']);
BazTest
Foo::unguard();
Bar::unguard();
Baz::unguard();
Foo::create(['column' => 'value']);
Bar::create(['column' => 'value']);
Baz::create(['column' => 'value']);
I figured it out using the
TestCaseevery Test class extends, and theEloquen\Modelevery model extends.tests/TestCase.php