Testing | laravel-sluggable-rust | Spatie       

 SPATIE  

  Laravel Sluggable 
====================

spatie.be/open-source

  [Docs](https://spatie.be/docs)  [Laravel-sluggable-rust](https://spatie.be/docs/laravel-sluggable-rust/v1)  Testing

 Version   v1      

 Other versions for crawler [v1](https://spatie.be/docs/laravel-sluggable-rust/v1) 

  Testing    
- [ Introduction ](https://spatie.be/docs/laravel-sluggable-rust/v1/introduction)
- [ Requirements ](https://spatie.be/docs/laravel-sluggable-rust/v1/requirements)
- [ Support us ](https://spatie.be/docs/laravel-sluggable-rust/v1/support-us)
- [ Installation and setup ](https://spatie.be/docs/laravel-sluggable-rust/v1/installation-setup)
- [ Translatable slugs ](https://spatie.be/docs/laravel-sluggable-rust/v1/translatable-slugs)
- [ Changelog ](https://spatie.be/docs/laravel-sluggable-rust/v1/changelog)
- [ Questions and issues ](https://spatie.be/docs/laravel-sluggable-rust/v1/questions-issues)
- [ Upgrading ](https://spatie.be/docs/laravel-sluggable-rust/v1/upgrading)
- [ Testing ](https://spatie.be/docs/laravel-sluggable-rust/v1/testing)
- [ Releasing ](https://spatie.be/docs/laravel-sluggable-rust/v1/releasing)

Basic usage
-----------

- [ Generating your first slug ](https://spatie.be/docs/laravel-sluggable-rust/v1/basic-usage/getting-started)
- [ Using slug options ](https://spatie.be/docs/laravel-sluggable-rust/v1/basic-usage/using-slug-options)
- [ Finding models by slug ](https://spatie.be/docs/laravel-sluggable-rust/v1/basic-usage/finding-models-by-slug)
- [ Self-healing URLs ](https://spatie.be/docs/laravel-sluggable-rust/v1/basic-usage/self-healing-urls)

Advanced usage
--------------

- [ Combining multiple source columns ](https://spatie.be/docs/laravel-sluggable-rust/v1/advanced-usage/source-fields)
- [ Tuning the uniqueness suffix ](https://spatie.be/docs/laravel-sluggable-rust/v1/advanced-usage/uniqueness)
- [ Overriding the underlying actions ](https://spatie.be/docs/laravel-sluggable-rust/v1/advanced-usage/overriding-actions)

 Testing
=======

###  On this page 

1. [ Other databases ](#content-other-databases)
2. [ Version and platform coverage ](#content-version-and-platform-coverage)

Run the model integration tests and executable guides with SQLite:

```
cargo fmt --all -- --check
cargo clippy --locked --all-targets --all-features -- -D warnings
cargo test --locked --all-targets --features sqlite
cargo test --locked --doc --features sqlite
cargo doc --locked --no-deps --all-features
cargo package --locked --features sqlite
```

The tests create real Laravel applications with the package provider, host-owned migrations and routes. Model creates and updates verify persistence, unique suffixes, explicit slugs, skip settings, source callbacks, scopes, transliteration, JSON locales, and replaceable actions. HTTP requests verify canonical URLs and stale redirects.

README.md and all Markdown guides participate in rustdoc tests. Hidden `# ` lines provide imports, migrated SQLite fixtures and assertions. Run doctests separately; `--all-targets` does not include them.

Other databases
-----------------------------------------------------------------------------------------------------

Point `TEST_DATABASE_URL` at a disposable test database and set `TEST_DATABASE_DRIVER` to `pgsql` or `mysql`. Then run the same integration tests with `--no-default-features --features postgres` or `--no-default-features --features mysql`. MariaDB uses the MySQL driver.

Laravel's `refresh_database()` creates isolated database copies and wraps each test in a rolled-back transaction. The database user needs permission to create databases. Never use production database credentials for this command.

Version and platform coverage
-----------------------------------------------------------------------------------------------------------------------------------------------

CI tests Laravel Rust 0.1.0 and the latest compatible release on Linux, macOS and Windows with SQLite. The database matrix repeats both Laravel versions with PostgreSQL 17, MySQL 8.4 and MariaDB 11. A separate job tests Rust 1.99.0; the platform matrix uses stable Rust.

CI also regenerates the language maps from a pinned portable-ascii commit and checks for changes. The generated file contains the upstream MIT license. The package behavior was inventoried from `spatie/laravel-sluggable` at `bb23b584efcc133ab9bd72ff1f6c4fae589c039d`.

Run `cargo audit` with access to the RustSec advisory database to check dependency advisories.

 A good
match?
-------------

### What we do best

- All things Laravel
- Custom frontend components
- Building APIs
- AI-powered features
- Simplifying things
- Clean solutions
- Integrating services

### Not our cup of tea

- WordPress themes
- Cutting corners
- Free mockups to win a job
- "Just execute the briefing"

 In short: we'd like to be a **substantial part** of your project.

 [ Get in touch via email ](mailto:info@spatie.be?subject=A%20good%20match%21&body=Tell%20us%20as%20much%20as%20you%20can%20about%0A-%20your%20online%20project%0A-%20your%20planning%0A-%20your%20budget%0A-%20%E2%80%A6%0A%0AAnything%20that%20helps%20us%20to%20start%20straightforward%21)
