Add resources defined in config and a bundle of the site's own screens

This commit is contained in:
Matthijs Iriks committed 2026-12-04 05:26:37 +01:00
1 parent 37a29d9195
commit 3345797141
35 files changed
+905 -19

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
<?php
namespace IriksIT\Manager\Tests;
/** A site with two resources of its own: one in a model of the site, one in the table of the package. */
abstract class ResourcesTestCase extends TestCase
{
protected function defineEnvironment($app): void
{
parent::defineEnvironment($app);
$app['config']->set('manager.resources', [
'services' => [
'label' => 'Services', 'singular' => 'Service', 'model' => \Service::class, 'columns' => ['name'], 'order' => ['position', 'asc'],
'fields' => ['name' => ['type' => 'text', 'required' => true], 'position' => ['type' => 'number'], 'visible' => ['type' => 'toggle']],
],
'links' => [
'label' => 'Links',
'fields' => ['label' => ['type' => 'text', 'required' => true], 'url' => ['type' => 'url'], 'new_tab' => ['type' => 'toggle']],
],
]);
}
}