friends-of-phpspec/phpspec-expect
Adds an expect() helper for PhpSpec, enabling expressive assertions like expect($value)->toBe(true) in your specs. Lightweight, dev-only dependency with compatibility across multiple PhpSpec and PHP versions.
*"This is a no-code, high-impact upgrade that modernizes our test infrastructure with almost zero risk. By adopting phpspec-expect (v4.1), we:
*"The new phpspec-expect release drops PHP 7.x support (finally!) and adds phpspec 8 compatibility. Here’s why we should upgrade:
expect($obj)->toBe()) is cleaner and more maintainable than custom solutions.*"This package lets us write tests more elegantly with phpspec. Key changes:
expect() syntax is more fluent and readable:
expect($user->name)->toBe('John')->and()->toStartWith('Jo');
RefreshDatabase).
How to start:composer require --dev friends-of-phpspec/phpspec-expect:^4.1.php -v to 8.1+.*"This upgrade supercharges our phpspec tests with:
toBe()->toHaveKey()).How can I help you explore Laravel packages today?