Download the PHP package nunomaduro/laravel-mojito without Composer
On this page you can find all versions of the php package nunomaduro/laravel-mojito. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download nunomaduro/laravel-mojito
More information about nunomaduro/laravel-mojito
Files in nunomaduro/laravel-mojito
Package laravel-mojito
Short Description A lightweight package for testing Laravel views.
License MIT
Informations about the package laravel-mojito
About Mojito
Mojito was created by, and is maintained by Nuno Maduro, and is a lightweight package for testing Laravel views in isolation.
Installation & Usage
Requires PHP 8.0+
Require Mojito using Composer:
How to use:
Optionally, you can also perform view testing from your HTTP Tests:
contains
Asserts that the view contains the given text.
empty
Asserts that the view has no text content.
Note: empty html nodes are not considered in this check.
first
Filters the view and returns only the first element matching the selector.
has
Asserts that the view has the given selector.
hasAttribute
Asserts that the view root element has the given attribute value.
hasClass
Asserts that the view has an element with the given class.
hasLink
Asserts that the view has an element with the given link.
in
Filters the view and returns only the elements matching the selector.
last
Filters the view and returns only the last element matching the selector.
hasMeta
Asserts that the view has a given metatag in the head section.
Macroable
Feel free to add your own macros to the ViewAssertion::class
.
Contributing
Thank you for considering to contribute to Mojito. All the contribution guidelines are mentioned here.
You can have a look at the @enunomaduro
Support the development
Do you like this project? Support it by donating
License
Mojito is an open-sourced software licensed under the MIT license.
All versions of laravel-mojito with dependencies
symfony/css-selector Version ^5.1|^6.0
symfony/dom-crawler Version ^5.1.8|^6.0