Skip to content

Commit

Permalink
Add other assertion tests
Browse files Browse the repository at this point in the history
  • Loading branch information
peter279k committed Mar 5, 2019
1 parent 0a6961a commit 8298ff8
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions tests/AssertsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,38 @@ public function testAssertJsonSubsets()

$this->assertJsonSubsets($expected, $expected2, $actual);
}

public function testAssertFloatEquals()
{
$expected = 5.6;

$actual = 2.8 + 2.8;

$this->assertFloatEquals($expected, $actual);
}

public function testAssertArrayHasKeys()
{
$expectedKeys = ['key1', 'key2'];

$array = [
'key1' => 'value1',
'key2' => 'value2',
];

$this->assertArrayHasKeys($expectedKeys, $array);
}

public function testAssertAll()
{
$expectations = [
'equals' => 1,
'lessThan' => 10,
'greaterThan' => 0,
];

$actual = 1;

$this->assertAll($expectations, $actual);
}
}

0 comments on commit 8298ff8

Please sign in to comment.