Skip to content

Commit

Permalink
adding a test
Browse files Browse the repository at this point in the history
  • Loading branch information
vlad-ko committed Sep 12, 2024
1 parent 4a80ce4 commit 741930d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/Models/Charge.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,4 +98,8 @@ public function moreDataFound() {
public function returnTrue() {
return true;
}

public function getSomeValue() {
return 'some value';
}
}
6 changes: 6 additions & 0 deletions tests/Unit/ChargeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,17 @@ public function testMoreDataFound() {
$this->assertTrue($result);

}

public function testReturnTrue() {

$charge = Charge::factory()->make();
$result = $charge->returnTrue();
$this->assertTrue($result);
}

public function testGetSomeValue() {
$charge = Charge::factory()->make();
$result = $charge->getSomeValue();
$this->assertEquals('some value', $result);
}
}

0 comments on commit 741930d

Please sign in to comment.