Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Pest Plugin Inside Laravel Package

faissaloux/pest-plugin-inside

Pest plugin to run tests from inside your app’s context. Provides helpers to bootstrap Laravel or other frameworks for faster, cleaner integration-style tests without leaving Pest. Simple setup, lightweight, and aimed at improving developer ergonomics.

View on GitHub
Deep Wiki
Context7

PEST PLUGIN INSIDE

This plugin checks what's inside the files.

Tests Codecov Packagist Version Total Downloads on Packagist Packagist License

Requirements

pest php pest-plugin-inside
^2.14 ^8.1 ^1.0.0
^3.0 ^8.2 ^1.2.0
^4.0 ^8.3 ^1.7.0
^5.0 ^8.4 ^1.11.0

Supported files

  • php
  • txt
  • stub

Available Expectations

toReturnLowercase

Make sure a file or directory files returns an array with all lowercase values.

expect('file.php')->toReturnLowercase();

toReturnUppercase

Make sure a file or directory files returns an array with all uppercase values.

expect('file.php')->toReturnUppercase();

toReturnUnique

Make sure a file or directory files returns an array with unique values.

expect('file.php')->toReturnUnique();

toReturnSingleWords

Make sure a file or directory files returns an array with single words.

expect('file.php')->toReturnSingleWords();

toBeOrdered

Make sure a file or directory files returns an array with words that are ordered.

expect('file.php')->toBeOrdered();

toReturnStrings

Make sure a file or directory files returns only string values.

expect('file.php')->toReturnStrings();

forbidEmpty

Make sure a file or directory files does not return any empty value.

expect('file.php')->forbidEmpty();

Success

<?php

// lowercase.php

return [
    'lower',
    'case',
    'lowercase',
    'array' => [
        'lower',
        'case',
    ],
];

expect('lowercase.php')->toReturnLowercase();

Failure

<?php

// notlowercase.php

return [
    'lower',
    'caSe',
    'lowercase',
];

expect('notlowercase.php')->toReturnLowercase();

Scan directory

directory
├── file.js
├── file.php
├── subdirectory
    ├── file.json
    ├── file1.php
    ├── file2.php
  • To scan all the php files in directory and all its subdirectories (file.php, file1.php and file2.php), we can use:
expect('directory')->toReturnLowercase();
  • We can also specify the scan depth using depth.
expect('directory')->toReturnLowercase(depth:0);

In this case it will only scan direct php file which is file.php.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle
atriumphp/atrium
sandermuller/package-boost-laravel
sandermuller/boost-skills
redaxo/core
yusufgenc/filament-api-forge
l3aro/rating-star-for-filament
leek/filament-subtenant-scope