Created
March 19, 2021 02:31
-
-
Save geshan/89866b3bed39e314bdee6eab3823e60f to your computer and use it in GitHub Desktop.
Markdium-5 useful PHPUnit Assertions you should start using now
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public function testAssertArrayHasKey() | |
| { | |
| $exchangeRates = ['usd' => 0.77, 'euro' => 0.63]; | |
| $this->assertArrayHasKey('usd', $exchangeRates, 'Check if USD is available'); | |
| $this->assertEquals(0.77, $exchangeRates['usd'], 'Test if USD rate is 0.77'); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment