Documentation

Testing

Pest v4 framework, test structure, test environment settings, and running tests

Last updated: Feb 09, 2026

Testing

Framework

Pest v4 with Laravel plugin. Configuration in phpunit.xml.

Test Structure

tests/
├── Pest.php              # Pest config & test helpers
├── TestCase.php          # Base test case
├── Feature/
│   ├── Auth/             # Authentication tests (7 files)
│   ├── Settings/         # Settings tests (3 files)
│   ├── Customer/         # CustomerAddressTest
│   ├── DashboardTest.php
│   └── ExampleTest.php
└── Unit/
    └── ExampleTest.php

Additional package-specific tests exist in packages/Cartxis/Shop/Tests/ and packages/Cartxis/Reports/src/Tests/.

Test Environment

SettingValue
DBMySQL cartxis (127.0.0.1:3306)
Cachearray
Mailarray
Sessionarray
Queuesync

Running Tests

# Via composer script (clears config first)
composer test

# Direct Pest
./vendor/bin/pest

# Specific suite
./vendor/bin/pest --testsuite=Feature
./vendor/bin/pest --testsuite=Unit