You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* The common asserts used throughout the dms testing suite.
*
* @author Elliot Levin <elliotlevin@hotmail.com>
*/
trait DmsAsserts
{
/**
* @param callable $operation
* @param string $exception
* @param string $message
*
* @return \Throwable|null
* @throws \Throwable
*/
public function assertThrows(callable $operation, $exception = \Exception::class, $message = 'Failed asserting that the operation throws an exception')
{
$thrownException = true;
try {
$operation();
$thrownException = false;
} catch (\Throwable $e) {
if (strpos(get_class($e), 'PHPUnit_Framework') === 0) {