24 lines
932 B
PHP
24 lines
932 B
PHP
<?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']],
|
|
],
|
|
]);
|
|
}
|
|
}
|