PHP Class Tests\PHPSA\Compiler\Expression\Operators\Arithmetical\PlusTest

Inheritance: extends Tests\PHPSA\TestCase
Show file Open project: ovr/phpsa

Public Methods

Method Description
intToFloatDataProvider ( ) : array Data provider for Plus {int} + {float} = {int}
intToIntDataProvider ( ) : array Data provider for Plus {int} + {int} = {int}
testFirstUnexpectedTypes ( ) Tests {left-expr::UNKNOWN} + {right-expr}
testPlusFloatToFloat ( $a, $b, $c ) Tests {float} + {float} = {float}
testPlusFloatToInt ( $b, $a, $c ) Tests {float} + {int} = {float}
testPlusIntToFloat ( $a, $b, $c ) Tests {int} + {float} = {float}
testPlusIntToInt ( $a, $b, $c ) Tests {int} + {int} = {int}
testSecondUnexpectedTypes ( ) Tests {left-expr} + {right-expr::UNKNOWN}

Method Details

intToFloatDataProvider() public method

Data provider for Plus {int} + {float} = {int}
public intToFloatDataProvider ( ) : array
return array

intToIntDataProvider() public method

Data provider for Plus {int} + {int} = {int}
public intToIntDataProvider ( ) : array
return array

testFirstUnexpectedTypes() public method

Tests {left-expr::UNKNOWN} + {right-expr}

testPlusFloatToFloat() public method

Tests {float} + {float} = {float}
public testPlusFloatToFloat ( $a, $b, $c )

testPlusFloatToInt() public method

testPlusFloatToInt($b, $a - it's special to use already defined fixtures
public testPlusFloatToInt ( $b, $a, $c )

testPlusIntToFloat() public method

Tests {int} + {float} = {float}
public testPlusIntToFloat ( $a, $b, $c )

testPlusIntToInt() public method

Tests {int} + {int} = {int}
public testPlusIntToInt ( $a, $b, $c )

testSecondUnexpectedTypes() public method

Tests {left-expr} + {right-expr::UNKNOWN}