From 326f33f9c6d595ba9b7ca56e3e109d1a1d7fb568 Mon Sep 17 00:00:00 2001 From: mark_story Date: Sat, 22 May 2010 13:09:17 -0400 Subject: [PATCH] Adding wrapper for assertIsA() assertion in simpletest. --- cake/tests/lib/cake_test_case.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/cake/tests/lib/cake_test_case.php b/cake/tests/lib/cake_test_case.php index 0dce116195f..c1abdaa3af7 100644 --- a/cake/tests/lib/cake_test_case.php +++ b/cake/tests/lib/cake_test_case.php @@ -477,10 +477,22 @@ protected function expectException($name = 'Exception', $message = '') { * @param string $message the text to display if the assertion is not correct * @return void */ - protected function assertReference(&$first, &$second, $message = '') { + protected function assertReference(&$first, &$second, $message = '') { return $this->assertSame($first, $second, $message); } +/** + * Compatibility wrapper for assertIsA + * + * @param string $object + * @param string $type + * @param string $message + * @return void + */ + protected function assertIsA($object, $type, $message = '') { + return $this->assertType($type, $object, $message); + } + /** * Compatibility function to test if value is between an acceptable range * @param mixed $value