TYPO3 CMS  TYPO3_7-6
TYPO3\CMS\Core\Tests\Unit\Utility\MathUtilityTest Class Reference
Inheritance diagram for TYPO3\CMS\Core\Tests\Unit\Utility\MathUtilityTest:
TYPO3\CMS\Core\Tests\UnitTestCase TYPO3\CMS\Core\Tests\BaseTestCase

Public Member Functions

 forceIntegerInRangeForcesIntegerIntoDefaultBoundariesDataProvider ()
 
 forceIntegerInRangeForcesIntegerIntoDefaultBoundaries ($expected, $value)
 
 forceIntegerInRangeSetsDefaultValueIfZeroValueIsGiven ()
 
 convertToPositiveIntegerReturnsZeroForNegativeValues ()
 
 convertToPositiveIntegerReturnsTheInputValueForPositiveValues ()
 
 functionCanBeInterpretedAsIntegerValidDataProvider ()
 
 canBeInterpretedAsIntegerReturnsTrue ($int)
 
 functionCanBeInterpretedAsIntegerInvalidDataProvider ()
 
 canBeInterpretedAsIntegerReturnsFalse ($int)
 
 functionCanBeInterpretedAsFloatValidDataProvider ()
 
 canBeInterpretedAsFloatReturnsTrue ($val)
 
 functionCanBeInterpretedAsFloatInvalidDataProvider ()
 
 canBeInterpretedAsFloatReturnsFalse ($int)
 
 calculateWithPriorityToAdditionAndSubtractionDataProvider ()
 
 calculateWithPriorityToAdditionAndSubtractionCorrectlyCalculatesExpression ($expected, $expression)
 
 calculateWithParenthesesDataProvider ()
 
 calculateWithParenthesesCorrectlyCalculatesExpression ($expected, $expression)
 
 isIntegerInRangeIncludesLowerBoundary ()
 
 isIntegerInRangeIncludesUpperBoundary ()
 
 isIntegerInRangeAcceptsValueInRange ()
 
 isIntegerInRangeRejectsValueOutsideOfRange ()
 
 isIntegerInRangeRejectsOtherDataTypesDataProvider ()
 
 isIntegerInRangeRejectsOtherDataTypes ($inputValue)
 

Additional Inherited Members

- Protected Member Functions inherited from TYPO3\CMS\Core\Tests\UnitTestCase
 tearDown ()
 
- Protected Member Functions inherited from TYPO3\CMS\Core\Tests\BaseTestCase
 getAccessibleMock ( $originalClassName, $methods=[], array $arguments=[], $mockClassName='', $callOriginalConstructor=true, $callOriginalClone=true, $callAutoload=true)
 
 getAccessibleMockForAbstractClass ( $originalClassName, array $arguments=[], $mockClassName='', $callOriginalConstructor=true, $callOriginalClone=true, $callAutoload=true, $mockedMethods=[])
 
 buildAccessibleProxy ($className)
 
 callInaccessibleMethod ($object, $name)
 
 inject ($target, $name, $dependency)
 
 getUniqueId ($prefix='')
 
- Protected Attributes inherited from TYPO3\CMS\Core\Tests\UnitTestCase
 $backupGlobalsBlacklist = ['TYPO3_LOADED_EXT']
 
 $testFilesToDelete = []
 
- Protected Attributes inherited from TYPO3\CMS\Core\Tests\BaseTestCase
 $backupGlobals = true
 
 $backupStaticAttributes = false
 

Detailed Description

Testcase for class

Definition at line 20 of file MathUtilityTest.php.

Member Function Documentation

◆ calculateWithParenthesesCorrectlyCalculatesExpression()

TYPO3\CMS\Core\Tests\Unit\Utility\MathUtilityTest::calculateWithParenthesesCorrectlyCalculatesExpression (   $expected,
  $expression 
)
Test:
calculateWithParenthesesDataProvider

Definition at line 296 of file MathUtilityTest.php.

◆ calculateWithParenthesesDataProvider()

TYPO3\CMS\Core\Tests\Unit\Utility\MathUtilityTest::calculateWithParenthesesDataProvider ( )

Data provider for calcParenthesis

Returns
array expected values, arithmetic expression

Definition at line 281 of file MathUtilityTest.php.

◆ calculateWithPriorityToAdditionAndSubtractionCorrectlyCalculatesExpression()

TYPO3\CMS\Core\Tests\Unit\Utility\MathUtilityTest::calculateWithPriorityToAdditionAndSubtractionCorrectlyCalculatesExpression (   $expected,
  $expression 
)
Test:
calculateWithPriorityToAdditionAndSubtractionDataProvider

Definition at line 268 of file MathUtilityTest.php.

◆ calculateWithPriorityToAdditionAndSubtractionDataProvider()

TYPO3\CMS\Core\Tests\Unit\Utility\MathUtilityTest::calculateWithPriorityToAdditionAndSubtractionDataProvider ( )

Data provider for calculateWithPriorityToAdditionAndSubtraction

Returns
array expected values, arithmetic expression

Definition at line 245 of file MathUtilityTest.php.

◆ canBeInterpretedAsFloatReturnsFalse()

TYPO3\CMS\Core\Tests\Unit\Utility\MathUtilityTest::canBeInterpretedAsFloatReturnsFalse (   $int)
Test:
functionCanBeInterpretedAsFloatInvalidDataProvider

Definition at line 232 of file MathUtilityTest.php.

◆ canBeInterpretedAsFloatReturnsTrue()

TYPO3\CMS\Core\Tests\Unit\Utility\MathUtilityTest::canBeInterpretedAsFloatReturnsTrue (   $val)
Test:
functionCanBeInterpretedAsFloatValidDataProvider

Definition at line 187 of file MathUtilityTest.php.

◆ canBeInterpretedAsIntegerReturnsFalse()

TYPO3\CMS\Core\Tests\Unit\Utility\MathUtilityTest::canBeInterpretedAsIntegerReturnsFalse (   $int)
Test:
functionCanBeInterpretedAsIntegerInvalidDataProvider

Definition at line 151 of file MathUtilityTest.php.

◆ canBeInterpretedAsIntegerReturnsTrue()

TYPO3\CMS\Core\Tests\Unit\Utility\MathUtilityTest::canBeInterpretedAsIntegerReturnsTrue (   $int)
Test:
functionCanBeInterpretedAsIntegerValidDataProvider

Definition at line 102 of file MathUtilityTest.php.

◆ convertToPositiveIntegerReturnsTheInputValueForPositiveValues()

TYPO3\CMS\Core\Tests\Unit\Utility\MathUtilityTest::convertToPositiveIntegerReturnsTheInputValueForPositiveValues ( )
Test:

Definition at line 72 of file MathUtilityTest.php.

◆ convertToPositiveIntegerReturnsZeroForNegativeValues()

TYPO3\CMS\Core\Tests\Unit\Utility\MathUtilityTest::convertToPositiveIntegerReturnsZeroForNegativeValues ( )
Test:

Definition at line 64 of file MathUtilityTest.php.

◆ forceIntegerInRangeForcesIntegerIntoDefaultBoundaries()

TYPO3\CMS\Core\Tests\Unit\Utility\MathUtilityTest::forceIntegerInRangeForcesIntegerIntoDefaultBoundaries (   $expected,
  $value 
)
Test:
forceIntegerInRangeForcesIntegerIntoDefaultBoundariesDataProvider

Definition at line 45 of file MathUtilityTest.php.

◆ forceIntegerInRangeForcesIntegerIntoDefaultBoundariesDataProvider()

TYPO3\CMS\Core\Tests\Unit\Utility\MathUtilityTest::forceIntegerInRangeForcesIntegerIntoDefaultBoundariesDataProvider ( )

Data provider for forceIntegerInRangeForcesIntegerIntoBoundaries

Returns
array expected values, arithmetic expression

Definition at line 30 of file MathUtilityTest.php.

◆ forceIntegerInRangeSetsDefaultValueIfZeroValueIsGiven()

TYPO3\CMS\Core\Tests\Unit\Utility\MathUtilityTest::forceIntegerInRangeSetsDefaultValueIfZeroValueIsGiven ( )
Test:

Definition at line 53 of file MathUtilityTest.php.

◆ functionCanBeInterpretedAsFloatInvalidDataProvider()

TYPO3\CMS\Core\Tests\Unit\Utility\MathUtilityTest::functionCanBeInterpretedAsFloatInvalidDataProvider ( )

Data provider for canBeInterpretedAsFloatReturnsFalse

Returns
array Data sets

Definition at line 197 of file MathUtilityTest.php.

◆ functionCanBeInterpretedAsFloatValidDataProvider()

TYPO3\CMS\Core\Tests\Unit\Utility\MathUtilityTest::functionCanBeInterpretedAsFloatValidDataProvider ( )

Data provider for canBeInterpretedAsFloatReturnsTrue

Returns
array Data sets

Definition at line 164 of file MathUtilityTest.php.

References TYPO3\CMS\Core\Tests\Unit\Utility\MathUtilityTest\functionCanBeInterpretedAsIntegerValidDataProvider().

◆ functionCanBeInterpretedAsIntegerInvalidDataProvider()

TYPO3\CMS\Core\Tests\Unit\Utility\MathUtilityTest::functionCanBeInterpretedAsIntegerInvalidDataProvider ( )

Data provider for canBeInterpretedAsIntegerReturnsFalse

Returns
array Data sets

Definition at line 112 of file MathUtilityTest.php.

◆ functionCanBeInterpretedAsIntegerValidDataProvider()

TYPO3\CMS\Core\Tests\Unit\Utility\MathUtilityTest::functionCanBeInterpretedAsIntegerValidDataProvider ( )

Data provider for canBeInterpretedAsIntegerReturnsTrue

Returns
array Data sets

Definition at line 85 of file MathUtilityTest.php.

Referenced by TYPO3\CMS\Core\Tests\Unit\Utility\MathUtilityTest\functionCanBeInterpretedAsFloatValidDataProvider().

◆ isIntegerInRangeAcceptsValueInRange()

TYPO3\CMS\Core\Tests\Unit\Utility\MathUtilityTest::isIntegerInRangeAcceptsValueInRange ( )
Test:

Definition at line 323 of file MathUtilityTest.php.

◆ isIntegerInRangeIncludesLowerBoundary()

TYPO3\CMS\Core\Tests\Unit\Utility\MathUtilityTest::isIntegerInRangeIncludesLowerBoundary ( )
Test:

Definition at line 307 of file MathUtilityTest.php.

◆ isIntegerInRangeIncludesUpperBoundary()

TYPO3\CMS\Core\Tests\Unit\Utility\MathUtilityTest::isIntegerInRangeIncludesUpperBoundary ( )
Test:

Definition at line 315 of file MathUtilityTest.php.

◆ isIntegerInRangeRejectsOtherDataTypes()

TYPO3\CMS\Core\Tests\Unit\Utility\MathUtilityTest::isIntegerInRangeRejectsOtherDataTypes (   $inputValue)
Test:
isIntegerInRangeRejectsOtherDataTypesDataProvider

Definition at line 356 of file MathUtilityTest.php.

◆ isIntegerInRangeRejectsOtherDataTypesDataProvider()

TYPO3\CMS\Core\Tests\Unit\Utility\MathUtilityTest::isIntegerInRangeRejectsOtherDataTypesDataProvider ( )

Data provider or isIntegerInRangeRejectsOtherDataTypes

Definition at line 339 of file MathUtilityTest.php.

◆ isIntegerInRangeRejectsValueOutsideOfRange()

TYPO3\CMS\Core\Tests\Unit\Utility\MathUtilityTest::isIntegerInRangeRejectsValueOutsideOfRange ( )
Test:

Definition at line 331 of file MathUtilityTest.php.