2026-01-26 23:24:57 +00:00
|
|
|
<?php
|
|
|
|
|
|
2026-02-23 06:18:30 +00:00
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
2026-01-26 23:24:57 +00:00
|
|
|
namespace Tests;
|
|
|
|
|
|
fix: add factories, fix HtmlSanitiser HTML5 elements, fix TestCase
- Create Database/Factories for ContentWebhookEndpoint, ContentWebhookLog,
ContentItem, ContentTaxonomy, ContentBrief
- Register HTML5 elements (section, article, figure, figcaption, mark)
with HTMLPurifier custom definitions
- Use RefreshDatabase trait in TestCase with SQLite in-memory DB
- Update Pest.php to use custom Tests\TestCase
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 07:01:48 +00:00
|
|
|
use Illuminate\Foundation\Testing\RefreshDatabase;
|
2026-02-23 06:18:30 +00:00
|
|
|
use Orchestra\Testbench\TestCase as BaseTestCase;
|
2026-01-26 23:24:57 +00:00
|
|
|
|
|
|
|
|
abstract class TestCase extends BaseTestCase
|
|
|
|
|
{
|
fix: add factories, fix HtmlSanitiser HTML5 elements, fix TestCase
- Create Database/Factories for ContentWebhookEndpoint, ContentWebhookLog,
ContentItem, ContentTaxonomy, ContentBrief
- Register HTML5 elements (section, article, figure, figcaption, mark)
with HTMLPurifier custom definitions
- Use RefreshDatabase trait in TestCase with SQLite in-memory DB
- Update Pest.php to use custom Tests\TestCase
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 07:01:48 +00:00
|
|
|
use RefreshDatabase;
|
|
|
|
|
|
2026-02-23 06:18:30 +00:00
|
|
|
protected function getPackageProviders($app): array
|
|
|
|
|
{
|
|
|
|
|
return [
|
2026-02-23 06:43:13 +00:00
|
|
|
\Core\Tenant\Boot::class,
|
2026-02-23 06:18:30 +00:00
|
|
|
\Core\Mod\Content\Boot::class,
|
|
|
|
|
];
|
|
|
|
|
}
|
fix: add factories, fix HtmlSanitiser HTML5 elements, fix TestCase
- Create Database/Factories for ContentWebhookEndpoint, ContentWebhookLog,
ContentItem, ContentTaxonomy, ContentBrief
- Register HTML5 elements (section, article, figure, figcaption, mark)
with HTMLPurifier custom definitions
- Use RefreshDatabase trait in TestCase with SQLite in-memory DB
- Update Pest.php to use custom Tests\TestCase
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 07:01:48 +00:00
|
|
|
|
|
|
|
|
protected function getEnvironmentSetUp($app): void
|
|
|
|
|
{
|
|
|
|
|
$app['config']->set('database.default', 'testing');
|
|
|
|
|
$app['config']->set('database.connections.testing', [
|
|
|
|
|
'driver' => 'sqlite',
|
|
|
|
|
'database' => ':memory:',
|
|
|
|
|
'prefix' => '',
|
|
|
|
|
]);
|
|
|
|
|
}
|
2026-01-26 23:24:57 +00:00
|
|
|
}
|