Pest Laravel Expectations

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads License

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 plugin is powered by def:studio

Edit this page on GitHub Updated at Thu, Mar 14, 2024