Skip to content

Commit

Permalink
[CLEANUP] Inline some variables in the tests
Browse files Browse the repository at this point in the history
This makes the tests more concise while still keeping them readable.
  • Loading branch information
oliverklee committed Nov 17, 2023
1 parent 1cd6ec4 commit c12c9e0
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,7 @@ public function findByUidForExistingRecordReturnsModel(): void
{
$this->importCSVDataSet(__DIR__ . '/../Fixtures/Product/Tea.csv');

$uid = 1;
$model = $this->subject->findByUid($uid);
$model = $this->subject->findByUid(1);

self::assertInstanceOf(Tea::class, $model);
}
Expand All @@ -86,8 +85,7 @@ public function findByUidForExistingRecordMapsAllScalarData(): void
{
$this->importCSVDataSet(__DIR__ . '/../Fixtures/Product/Tea.csv');

$uid = 1;
$model = $this->subject->findByUid($uid);
$model = $this->subject->findByUid(1);
self::assertInstanceOf(Tea::class, $model);

self::assertSame('Earl Grey', $model->getTitle());
Expand All @@ -102,8 +100,7 @@ public function fillsImageRelation(): void
{
$this->importCSVDataSet(__DIR__ . '/../Fixtures/Product/Tea.csv');

$uid = 3;
$model = $this->subject->findByUid($uid);
$model = $this->subject->findByUid(3);

$image = $model->getImage();
self::assertInstanceOf(FileReference::class, $image);
Expand Down

0 comments on commit c12c9e0

Please sign in to comment.