DEF STUDIO srl

Latest Version on Packagist Downloads Tests Code Style License Follow Us

Easily add Laravel specific expectations to your Pest testing ecosystem

it('can check model exists', function(){
  $user = User::factory()->create();
  
  expect($user)->toExist();
});
test('user can edit a post', function(){
  $user = User::factory()->create();
  
  expect($user)->toBeAbleTo('edit', $post);
});
test('home is rendered', function () {
    $response = get('/home');

    expect($response)->toBeSuccessful();
});

Get the full source code at https://github.com/defstudio/pest-plugin-laravel-expectations

This package is powered by def:studio, follow us on Twitter

Edit this page
Last updated 02 May 2024