GetSmsCostTest.php
/**
     * Method is checking that tax rate
     * is ignored when null was given
     * as second parameter, and also it
     * checks that tax is including
     * properly when it was specified
     * 
     * @access  public
     * @return  void
     */
Method is checking that tax rate
is ignored when null was given
as second parameter, and also it
checks that tax is including
properly when it was specified

@access  public
@return  void
Method is checking that tax rate is ignored when null was given as second parameter and also it checks that tax is including properly when it was specified @access public @return void
public function testIgnoringTaxRateWhenNull()
    {
        static $number = '925333';
        static $tax    = 0.23;
        $expectedTaxValue = 25.00 + (25.00 * $tax);
        $resultWithoutTax  = getSmsCost($number);
        $resultWithoutTax2 = getSmsCost($number, null);
        $resultWithTax  = getSmsCost($number, $tax);
        $this->assertEquals($resultWithoutTax, $resultWithoutTax2);
        $this->assertNotEquals($resultWithoutTax, $resultWithTax);
        $this->assertEquals($expectedTaxValue, $resultWithTax);
    }
public function testIgnoringTaxRateWhenNull ( ) { static $ number = '925333' ; static $ tax = 0.23 ; $ expectedTaxValue = 25.00 + ( 25.00 * $ tax ) ; $ resultWithoutTax = getSmsCost ( $ number ) ; $ resultWithoutTax2 = getSmsCost ( $ number , null ) ; $ resultWithTax = getSmsCost ( $ number , $ tax ) ; $ this -> assertEquals ( $ resultWithoutTax , $ resultWithoutTax2 ) ; $ this -> assertNotEquals ( $ resultWithoutTax , $ resultWithTax ) ; $ this -> assertEquals ( $ expectedTaxValue , $ resultWithTax ) ; }
Method is checking that tax rate
 is ignored when null was given
 as second parameter, and also it
 checks that tax is including
 properly when it was specified
Method is checking that tax rate is ignored when null was given as second parameter and also it checks that tax is including properly when it was specified
// Number cost is 25.00 (without tax) // Expected total value // Bot hof these values should be equal // This value should not be equal