示例#1
0
 public function matchesSafelyWithDiagnosticDescription($actual, Hamcrest_Description $mismatchDescription)
 {
     if (method_exists($actual, 'toString') || method_exists($actual, '__toString')) {
         return parent::matchesSafelyWithDiagnosticDescription($actual, $mismatchDescription);
     }
     return false;
 }
 public function __construct(Hamcrest_Matcher $sizeMatcher)
 {
     parent::__construct(self::TYPE_OBJECT, 'Traversable', $sizeMatcher, 'a traversable with size', 'traversable size');
 }
 public function __construct()
 {
     parent::__construct(self::TYPE_ANY, null, equalTo('bar'), 'Thingy with result', 'result');
 }
 public function __construct(Hamcrest_Matcher $sizeMatcher)
 {
     parent::__construct(self::TYPE_ARRAY, null, $sizeMatcher, 'an array with size', 'array size');
 }