Test that doesn't assert anything

Test that doesn't assert anything, just launch something which may or may not throw an exception

1class MigrationsTest extends TestCase
2{
3 public function test_successful_foreign_key_in_migrations()
4 {
5 // We just test if the migrations succeeds or throws an exception
6 $this->expectNotToPerformAssertions();
7 
8 
9 Artisan::call('migrate:fresh', ['--path' => '/databse/migrations/task1']);
10 }
11}

Like our articles?

Become a Premium Member for $129/year or $29/month
What else you will get:
  • 22 courses (477 lessons, total 38 h 20 min)
  • 2 long-form tutorials (one new every week)
  • access to project repositories
  • access to private Discord