Documentation Test Coverage
Every documented feature is backed by automated tests. This page maps docs to tests so you can verify everything works.
How to Run Tests
# Run all tests
vendor/bin/pest
# Run only fast unit tests (class existence checks)
vendor/bin/pest tests/Unit/
# Run feature tests (need database)
vendor/bin/pest tests/Feature/
Test Coverage Map
Unit Tests (fast, no database needed)
These tests verify that every class, method, and feature mentioned in the docs actually exists in the source code. They run in ~1 second.
| Documentation Page | Test File | What's Verified |
|---|---|---|
| Form Fields | tests/Unit/ClassExistsTest.php | All 50+ form field classes exist |
| Grid Filters | tests/Unit/ClassExistsTest.php | Equal, Like, Between, In, Where, Scope filters |
| Grid Actions | tests/Unit/ClassExistsTest.php | Actions, DropdownActions displayers |
| Data Export | tests/Unit/ClassExistsTest.php | CsvExporter class |
| Permissions | tests/Unit/ClassExistsTest.php | Permission check/allow/deny methods, all Auth models |
| Commands | tests/Unit/ClassExistsTest.php | All 9 console commands |
| Widgets | tests/Unit/WidgetsTest.php | Box, Tab, Table, InfoBox, Collapse, Alert, Callout, Carousel, Form |
Feature Tests (integration, needs database)
These tests boot the full Laravel application and verify actual CRUD operations work end-to-end.
| Documentation Page | Test File | What's Verified |
|---|---|---|
| Installation | tests/Feature/InstallTest.php | Admin directory created |
| Installation | tests/Feature/ConsoleCommandsTest.php | Commands, tables, seed data |
| Quick Start | tests/Feature/LaravelTest.php | Laravel app boots |
| Commands | tests/Feature/ConsoleCommandsTest.php | All console commands registered |
| Configuration | tests/Feature/ConfigurationTest.php | All config options |
| Configuration | tests/Feature/UserSettingTest.php | Settings page loads |
| Model Grid | tests/Feature/UserGridTest.php | Grid renders with columns |
| Model Grid | tests/Feature/GridDisplayTest.php | Grid construction, options |
| Grid Column | tests/Feature/GridColumnTest.php | Column displayers, actions |
| Grid Column | tests/Feature/GridColumnConfigTest.php | Column width, color, attributes |
| Column Display | tests/Feature/GridColumnDisplayMethodsTest.php | All display methods |
| Grid Actions | tests/Feature/GridActionsTest.php | Row/batch actions, displayers |
| Grid Filters | tests/Feature/GridFilterTest.php | Filter types, conditions |
| Inline Editing | tests/Feature/GridInlineEditTest.php | Editable, switch, select |
| Grid Export | tests/Feature/GridExportTest.php | CsvExporter, export options |
| Grid Tools | tests/Feature/GridToolsTest.php | Header, footer, quickSearch, selector |
| Model Form | tests/Feature/UserFormTest.php | Create form loads |
| Form Fields | tests/Feature/FormFieldsTest.php | Basic field types |
| Form Fields | tests/Feature/FormFieldTypesTest.php | All 60+ field types |
| Form Validation | tests/Feature/FormValidationTest.php | Rules, creationRules, updateRules |
| Form Callbacks | tests/Feature/FormCallbacksTest.php | Saving, saved, deleting hooks |
| Form Layout | tests/Feature/FormLayoutTest.php | Tabs, columns, rows, fieldset |
| Form Upload | tests/Feature/FormUploadFieldsTest.php | Image, file, multipleImage |
| Form Upload | tests/Feature/FileUploadTest.php | File upload form loads |
| Form Upload | tests/Feature/ImageUploadTest.php | Image upload form loads |
| Model Show | tests/Feature/ShowBuilderTest.php | Show construction, fields |
| Model Show | tests/Feature/ShowFieldsTest.php | Field display methods, panel |
| Model Tree | tests/Feature/ModelTreeTest.php | Tree selectOptions works |
| Model Tree | tests/Feature/TreeBuilderTest.php | Tree construction, tools |
| Permissions | tests/Feature/PermissionsTest.php | Permissions page loads |
| Permissions | tests/Feature/RolesTest.php | Roles page loads |
| Permissions | tests/Feature/UsersTest.php | Users page loads |
| RBAC | tests/Feature/RbacTest.php | Full RBAC system tests |
| Extensions | tests/Feature/ExtensionsTest.php | Extension registration |
| Frontend | tests/Feature/FrontendAssetsTest.php | CSS, JS, script, style |
| Templates | tests/Feature/FrontendAssetsTest.php | Template config |
| n/a | tests/Feature/AdminClassTest.php | Admin facade methods |
| n/a | tests/Feature/AdminCrudTest.php | User/Role/Permission CRUD |
| n/a | tests/Feature/AuthSettingsTest.php | Auth settings page |
| n/a | tests/Feature/AuthTest.php | Login form, authentication |
| n/a | tests/Feature/ContentLayoutTest.php | Content layout builder |
| n/a | tests/Feature/IndexTest.php | Dashboard loads |
| n/a | tests/Feature/MenuTest.php | Menu page loads |
| n/a | tests/Feature/MiddlewareTest.php | Middleware classes |
| n/a | tests/Feature/OperationLogTest.php | Operation log page loads |
| n/a | tests/Feature/ServiceProviderTest.php | Service provider, routes |
| n/a | tests/BasicAuthTest.php | Full login/logout flow |
Adding a CI Badge
To show test status publicly, add a GitHub Actions workflow:
# .github/workflows/tests.yml
name: Tests
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
php: [8.2, 8.3, 8.4]
laravel: [10.*, 11.*, 12.*, 13.*]
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
- run: composer install --no-interaction
- run: vendor/bin/pest
Then add this badge to your README:
