public function testnumber_format() { $string = new williamknauss\String(); $string->set_string(1234.56); $string->number_format(); //assert 1 $this->assertEquals(number_format(1234.56), $string->return_string()); $string = new williamknauss\String(); $string->number_format(1234.56); //assert 2 $this->assertEquals(number_format(1234.56), $string->return_string()); }
/** * @expectedException Exception * @expectedExceptionMessage number() expects two parameters. The number parameter is required and must be numeric. */ public function testnumber_format_non_numeric_exception() { $string = new williamknauss\String("Hello World"); $string->number_format(); }