mirror of
https://github.com/mosbth/cimage.git
synced 2025-08-06 16:16:39 +02:00
made passing behat
This commit is contained in:
32
features/bootstrap/assert.php
Normal file
32
features/bootstrap/assert.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
/**
|
||||
* Assert functions.
|
||||
*/
|
||||
function assertNotEquals($expected, $actual)
|
||||
{
|
||||
if (!($expected !== $actual)) {
|
||||
throw new Exception("Failed asserting that '$expected' is not equal to '$actual'.");
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
function assertEquals($expected, $actual)
|
||||
{
|
||||
if (!($expected === $actual)) {
|
||||
throw new Exception("Failed asserting that '$expected' is equal to '$actual'.");
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Check that $needle is an element of $haystack.
|
||||
*/
|
||||
|
||||
function assertContains($needle, $haystack)
|
||||
{
|
||||
if (!in_array($needle, $haystack)) {
|
||||
throw new Exception("Failed asserting that '$needle' is not in haystack.");
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user