workbench, tests

This commit is contained in:
icefox 2026-02-23 21:09:02 -03:00
parent d83a324eb0
commit 367858c97c
No known key found for this signature in database
27 changed files with 568 additions and 410 deletions

View file

@ -1,7 +0,0 @@
<?php
use Illuminate\Foundation\Application;
use function Orchestra\Testbench\default_skeleton_path;
return Application::configure(basePath: $APP_BASE_PATH ?? default_skeleton_path())->create();

15
workbench/config/dto.php Normal file
View file

@ -0,0 +1,15 @@
<?php
use Psr\Log\LogLevel;
return [
'logging' => [
'channel' => 'dto',
'context' => [
'rules' => LogLevel::NOTICE,
'input' => LogLevel::INFO,
'casts' => LogLevel::INFO,
'internals' => LogLevel::DEBUG,
],
],
];

View file

@ -0,0 +1,16 @@
<?php
use Monolog\Formatter\JsonFormatter;
return [
'default' => env('LOG_CHANNEL', 'single'),
'channels' => [
'dto' => [
'driver' => 'single',
'path' => getcwd() . '/logs/dto.log',
'level' => 'debug',
'replace_placeholders' => true,
'formatter' => JsonFormatter::class,
],
],
];

17
workbench/phpunit.xml Normal file
View file

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
bootstrap="vendor/autoload.php"
colors="true"
>
<testsuites>
<testsuite name="root">
<directory>tests</directory>
</testsuite>
</testsuites>
<source>
<include>
<directory>app</directory>
</include>
</source>
</phpunit>