Changeset 2868
- Timestamp:
- 11/29/06 14:35:34 (2 years ago)
- Files:
-
- tools/lime/lib/lime.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
tools/lime/lib/lime.php
r2805 r2868 86 86 function is($exp1, $exp2, $message = '') 87 87 { 88 if (!$result = $this->ok($exp1 == $exp2, $message)) 88 if (is_object($exp1) || is_object($exp2)) 89 { 90 $value = $exp1 === $exp2; 91 } 92 else 93 { 94 $value = $exp1 == $exp2; 95 } 96 97 if (!$result = $this->ok($value, $message)) 89 98 { 90 99 $this->output->diag(sprintf(" got: %s", str_replace("\n", '', var_export($exp1, true))), sprintf(" expected: %s", str_replace("\n", '', var_export($exp2, true)))); … … 507 516 foreach (explode("\n", $lines) as $text) 508 517 { 509 if ( 0 === strpos($text, 'not ok '))518 if (false !== strpos($text, 'not ok ')) 510 519 { 511 520 ++$this->current_test; … … 516 525 ++$this->stats['_nb_tests']; 517 526 } 518 else if ( 0 === strpos($text, 'ok '))527 else if (false !== strpos($text, 'ok ')) 519 528 { 520 529 ++$this->stats[$this->current_file]['nb_tests'];