Skip to content

Commit

Permalink
✅ Add test for invokable actions
Browse files Browse the repository at this point in the history
  • Loading branch information
lorisleiva committed Aug 5, 2019
1 parent e89a9d6 commit e201a84
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/RunsAsObjectsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,18 @@ public function it_can_run_with_some_additional_data_to_fill()
$this->assertEquals(8, $response);
}

/** @test */
public function it_can_run_like_an_invokable_object()
{
$response = (new SimpleCalculator())([
'operation' => 'addition',
'left' => 3,
'right' => 5,
]);

$this->assertEquals(8, $response);
}

/** @test */
public function it_can_override_all_attributes_with_a_given_array()
{
Expand Down

0 comments on commit e201a84

Please sign in to comment.