Skip to content

Commit

Permalink
Ensure that assertions methods are not called statically. (#41179)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasmichot authored Feb 22, 2022
1 parent 9ff29cb commit 2002931
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ public function __toString()
];

$models = $relation->match([$model1, $model2], Collection::wrap($result1), 'foo');
self::assertNull($models[1]->foo);
self::assertEquals(1, $models[0]->foo->count());
self::assertContains($result1, $models[0]->foo);
$this->assertNull($models[1]->foo);
$this->assertSame(1, $models[0]->foo->count());
$this->assertContains($result1, $models[0]->foo);
}

protected function getRelation()
Expand Down
2 changes: 1 addition & 1 deletion tests/Integration/Database/EloquentCursorPaginateTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function testPaginationWithUnion()
->orderBy('user_id', 'desc')
->cursorPaginate(1);

self::assertSame(['user_id'], $result->getOptions()['parameters']);
$this->assertSame(['user_id'], $result->getOptions()['parameters']);
}

public function testPaginationWithDistinct()
Expand Down
2 changes: 1 addition & 1 deletion tests/Integration/Encryption/EncryptionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ protected function getPackageProviders($app)

public function testEncryptionProviderBind()
{
self::assertInstanceOf(Encrypter::class, $this->app->make('encrypter'));
$this->assertInstanceOf(Encrypter::class, $this->app->make('encrypter'));
}

public function testEncryptionWillNotBeInstantiableWhenMissingAppKey()
Expand Down
10 changes: 5 additions & 5 deletions tests/Integration/Migration/MigratorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ public function testMigrate()

$this->subject->run([__DIR__.'/fixtures']);

self::assertTrue(DB::getSchemaBuilder()->hasTable('people'));
self::assertTrue(DB::getSchemaBuilder()->hasColumn('people', 'first_name'));
self::assertTrue(DB::getSchemaBuilder()->hasColumn('people', 'last_name'));
$this->assertTrue(DB::getSchemaBuilder()->hasTable('people'));
$this->assertTrue(DB::getSchemaBuilder()->hasColumn('people', 'first_name'));
$this->assertTrue(DB::getSchemaBuilder()->hasColumn('people', 'last_name'));
}

public function testRollback()
Expand All @@ -56,7 +56,7 @@ public function testRollback()

$this->subject->rollback([__DIR__.'/fixtures']);

self::assertFalse(DB::getSchemaBuilder()->hasTable('people'));
$this->assertFalse(DB::getSchemaBuilder()->hasTable('people'));
}

public function testPretendMigrate()
Expand All @@ -68,7 +68,7 @@ public function testPretendMigrate()

$this->subject->run([__DIR__.'/fixtures'], ['pretend' => true]);

self::assertFalse(DB::getSchemaBuilder()->hasTable('people'));
$this->assertFalse(DB::getSchemaBuilder()->hasTable('people'));
}

private function expectOutput($argument): void
Expand Down

0 comments on commit 2002931

Please sign in to comment.