function should_respond_to_a_implemented_method() { $t = new Testing(); expects($t->respond_to('real_method'))->should_be(true); expects($t->respond_to('testing'))->should_be(true); expects($t->respond_to('protected_method'))->should_be(true); expects($t->respond_to('protected_method'))->should_be(true); expects($t->respond_to('invalid'))->should_be_false(); }
protected function protected_method() { return 'protected_method'; } } Testing::extend('Whoa', 'Dude'); $t = new Testing(); $t->testing(); echo "\n"; $t->testing2(); echo "\n"; echo $t->testing2(); echo "\n"; echo $t->send('testing') . ' guy'; echo "\n"; echo $t->respond_to('real_method'); echo "\n"; echo $t->respond_to('testing'); echo "\n"; echo $t->respond_to('protected_method'); echo "\n"; echo $t->respond_to('invalid'); echo "\n"; echo $t->super_test('sean'); echo "\n"; echo $t->is_a('Testing'); echo "\n"; echo $t->is_a('Invalid'); echo "\n"; // $dup = $t->dup(); // print_r($dup);