You are here

ErrorHelpers.php in Auth0 Single Sign On 8.2

Namespace

Auth0\Tests\Traits

File

vendor/auth0/auth0-php/tests/traits/ErrorHelpers.php
View source
<?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));
  }

}

Traits

Namesort descending Description
ErrorHelpers