PHPackages                             mnabialek/laravel-test-css - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. mnabialek/laravel-test-css

ActiveLibrary[Testing &amp; Quality](/categories/testing)

mnabialek/laravel-test-css
==========================

Allows to add some custom CSS styles when running tests

v1.3.5(2y ago)23531[2 PRs](https://github.com/mnabialek/laravel-test-css/pulls)MITPHPCI passing

Since Sep 26Pushed 1y ago1 watchersCompare

[ Source](https://github.com/mnabialek/laravel-test-css)[ Packagist](https://packagist.org/packages/mnabialek/laravel-test-css)[ RSS](/packages/mnabialek-laravel-test-css/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (9)Dependencies (2)Versions (13)Used By (0)

Laravel test CSS
----------------

[](#laravel-test-css)

This package allows you to easily add custom CSS style when running PhpUnit tests. This is especially useful when running Laravel Dusk tests when you use remote fonts (for example from Google) and your screenshots will contain blank space instead of font in case of failure. You can also hide some elements if they are not needed for site functionality and you don't want to display them on screenshots when running Dusk tests.

### Installation

[](#installation)

1. Run

    ```
    composer require mnabialek/laravel-test-css --dev
    ```

    in console to install this module (Notice `--dev` flag - it's recommended to use this package only for development).
2. If you use Laravel &lt; 5.5 open `config/app.php` and in `providers` section add:

    ```
    Mnabialek\LaravelTestCss\Providers\LaravelTestCss::class,
    ```

    Laravel 5.5 and later uses Package Auto-Discovery and it will automatically load this service provider so you don't need to add anything into above file.
3. **Optional step:** If you need to adjust style rule you can add `LARAVEL_TEST_CSS_STYLE=` in your `.env` file or publish configuration file. By default style rule looks like this:

    ```
    html * { font-family: sans-serif !important; }
    ```

    so default font will be used for all HTML elements to display valid texts when running Laravel Dusk tests and taking screenshots in case of failure

### Usage

[](#usage)

This package will automatically add custom styles just before `` HTMl tag. Be aware this package add stylesheets only when environment is set to `testing` and when response is in `text/html` format.

###  Health Score

36

↑

LowBetter than 82% of packages

Maintenance36

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~263 days

Recently: every ~311 days

Total

10

Last Release

779d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/75e68c5eb4daa861595caa21f3d4c6f94ff25118535bc8eac93648b095eab307?d=identicon)[mnabialek](/maintainers/mnabialek)

---

Top Contributors

[![mnabialek](https://avatars.githubusercontent.com/u/7656807?v=4)](https://github.com/mnabialek "mnabialek (11 commits)")

---

Tags

laravelduskdusk testingdusk fontsfonts testinglaravel test css

###  Code Quality

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/mnabialek-laravel-test-css/health.svg)

```
[![Health](https://phpackages.com/badges/mnabialek-laravel-test-css/health.svg)](https://phpackages.com/packages/mnabialek-laravel-test-css)
```

###  Alternatives

[orchestra/testbench

Laravel Testing Helper for Packages Development

2.2k39.1M32.1k](/packages/orchestra-testbench)[hotmeteor/spectator

Testing helpers for your OpenAPI spec

3021.4M1](/packages/hotmeteor-spectator)[orchestra/workbench

Workbench Companion for Laravel Packages Development

8017.0M43](/packages/orchestra-workbench)[guanguans/laravel-soar

SQL optimizer and rewriter for laravel. - laravel 的 SQL 优化器和重写器。

2227.8k](/packages/guanguans-laravel-soar)[derekmd/laravel-dusk-firefox

Run Laravel Dusk tests in a Firefox browser

4883.4k1](/packages/derekmd-laravel-dusk-firefox)[spurwork/spectator

Testing helpers for your OpenAPI spec

3021.5k](/packages/spurwork-spectator)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
