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)23541[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 4w 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

35

—

LowBetter than 77% of packages

Maintenance33

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

871d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/7656807?v=4)[Marcin Nabiałek](/maintainers/mnabialek)[@mnabialek](https://github.com/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

[unopim/unopim

UnoPim Laravel PIM

10.8k2.5k](/packages/unopim-unopim)[api-platform/laravel

API Platform support for Laravel

58190.1k21](/packages/api-platform-laravel)[ecotone/laravel

Ecotone for Laravel — CQRS, Event Sourcing, Sagas, Durable Workflows, and Outbox on top of Laravel Queue, via PHP attributes.

21327.3k4](/packages/ecotone-laravel)[duncanmcclean/statamic-cargo

Comprehensive e-commerce addon for Statamic. Build bespoke e-commerce sites without the complexity.

3622.8k](/packages/duncanmcclean-statamic-cargo)[mominalzaraa/filament-localization

The first and only automatic Filament localization package with intelligent resource scanning, structured translation files, and comprehensive testing

103.5k](/packages/mominalzaraa-filament-localization)

PHPackages © 2026

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