Skip Menu |

This queue is for tickets about the Test.php CPAN distribution.

Report information
The Basics
Id: 27487
Status: open
Priority: 0/
Queue: Test.php

People
Owner: Nobody in particular
Requestors: andy [...] shitov.ru
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 0.06



Subject: isa_ok fails for subclasses
isa_ok should pass when the object being tested is a subclass of the desired class. The attached patch fixes this.
Subject: isa_ok.patch
diff -ur Test.php-0.05.orig/Test.php Test.php-0.05/Test.php --- Test.php-0.05.orig/Test.php 2007-06-06 13:45:24.000000000 +0100 +++ Test.php-0.05/Test.php 2007-06-07 20:27:30.000000000 +0100 @@ -148,8 +148,7 @@ } function isa_ok($obj, $expected, $desc = '') { - $name = get_class($obj); - $pass = $name == $expected; + $pass = is_a($obj, $expected); proclaim($pass, $desc, /* todo */ false, $name, $expected); }
On Thu Jun 07 15:41:15 2007, ANDYA wrote: Show quoted text
> isa_ok should pass when the object being tested is a subclass of the > desired class. The attached > patch fixes this.
Thanks! Applied and released as part of 0.06