recon/application/vendor/auth0/auth0-php/tests/traits/ErrorHelpers.php
2023-02-27 18:53:14 +05:30

20 lines
417 B
PHP

<?php
namespace Auth0\Tests\traits;
trait ErrorHelpers
{
/**
* Does an error message contain a specific string?
*
* @param \Exception $e - Error object.
* @param string $str - String to find in the error message.
*
* @return boolean
*/
protected function errorHasString(\Exception $e, $str)
{
return ! (false === strpos($e->getMessage(), $str));
}
}