* @package FIT * @subpackage Example * @license LGPL http://www.gnu.org/copyleft/lesser.html */ /** * Load basic fixture: Column and HelloWorld */ Testing_FIT_Loader::loadClass( 'Testing_FIT_Fixture' , 'Testing_FIT_Fixture_Column' ); /** * FIT Examples * * @version 0.1.1 * @package FIT * @subpackage Example */ class Math_Calculator extends Testing_FIT_Fixture_Column { /** * number "a" * @var float */ public $a; /** * number "b" * @var float */ public $b; /** * calculate quotient * * This is the same as a / b * * @return float */ public function quotient() { if( $this->b == 0 ) { throw new Exception( 'division by zero' ); } return $this->a / $this->b; } /** * calculate sum * * This is the same as a + b * * @return float */ public function sum() { return $this->a + $this->b; } /** * calculate sub * * This is the same as a - b * * @return float */ public function sub() { return $this->a - $this->b; } } ?>