Skip to content

Commit

Permalink
Fix tests by using strict types for data
Browse files Browse the repository at this point in the history
  • Loading branch information
michalsn committed Jan 10, 2021
1 parent d3b2570 commit 2907f68
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/system/Models/InsertModelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,8 @@ public function testInsertWithSetAndEscape(): void
$this->model->set('country', '1+1', false)->set('email', '2+2')->insert($userData);

$this->assertGreaterThan(0, $this->model->getInsertID());
$result = $this->model->where('name', 'Scott')->where('country', '2')->where('email', '2+2')->first();

$result = $this->model->where('name', 'Scott')->where('country', 2)->where('email', '2+2')->first();
$this->assertCloseEnough(time(), strtotime($result->created_at));
}
}
2 changes: 1 addition & 1 deletion tests/system/Models/UpdateModelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ public function testUpdateWithSetAndEscape(): void

$this->seeInDatabase('user', [
'name' => 'Scott',
'country' => 4,
'country' => '4',
'email' => '1+1',
]);
}
Expand Down

0 comments on commit 2907f68

Please sign in to comment.