TYPO3 CMS  TYPO3_6-2
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, array $methods=array(), array $arguments=array(), $mockClassName='', $callOriginalConstructor=TRUE, $callOriginalClone=TRUE, $callAutoload=TRUE)
 
 getAccessibleMockForAbstractClass ( $originalClassName, array $arguments=array(), $mockClassName='', $callOriginalConstructor=TRUE, $callOriginalClone=TRUE, $callAutoload=TRUE)
 
 buildAccessibleProxy ($className)
 
 callInaccessibleMethod ($object, $name)
 
 inject ($target, $name, $dependency)
 
 getUniqueId ($prefix='')
 
- Protected Attributes inherited from TYPO3\CMS\Core\Tests\UnitTestCase
 $backupGlobalsBlacklist = array('TYPO3_LOADED_EXT')
 
- Protected Attributes inherited from TYPO3\CMS\Core\Tests\BaseTestCase
 $backupGlobals = TRUE
 
 $backupStaticAttributes = FALSE
 

Detailed Description

This file is part of the TYPO3 CMS project.

It is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, either version 2 of the License, or any later version.

For the full copyright and license information, please read the LICENSE.txt file that was distributed with this source code.

The TYPO3 project - inspiring people to share! Testcase for class

Author
Susanne Moog typo3.nosp@m.@sus.nosp@m.anne-.nosp@m.moog.nosp@m..de

Definition at line 22 of file MathUtilityTest.php.

Member Function Documentation

◆ calculateWithParenthesesCorrectlyCalculatesExpression()

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

Definition at line 282 of file MathUtilityTest.php.

References TYPO3\CMS\Core\Utility\MathUtility\calculateWithParentheses().

◆ calculateWithParenthesesDataProvider()

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

Data provider for calcParenthesis

Returns
array expected values, arithmetic expression

Definition at line 268 of file MathUtilityTest.php.

◆ calculateWithPriorityToAdditionAndSubtractionCorrectlyCalculatesExpression()

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

Definition at line 256 of file MathUtilityTest.php.

References TYPO3\CMS\Core\Utility\MathUtility\calculateWithPriorityToAdditionAndSubtraction().

◆ calculateWithPriorityToAdditionAndSubtractionDataProvider()

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

Data provider for calculateWithPriorityToAdditionAndSubtraction

Returns
array expected values, arithmetic expression

Definition at line 234 of file MathUtilityTest.php.

◆ canBeInterpretedAsFloatReturnsFalse()

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

Definition at line 222 of file MathUtilityTest.php.

References TYPO3\CMS\Core\Utility\MathUtility\canBeInterpretedAsFloat().

◆ canBeInterpretedAsFloatReturnsTrue()

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

Definition at line 179 of file MathUtilityTest.php.

References TYPO3\CMS\Core\Utility\MathUtility\canBeInterpretedAsFloat().

◆ canBeInterpretedAsIntegerReturnsFalse()

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

Definition at line 145 of file MathUtilityTest.php.

References TYPO3\CMS\Core\Utility\MathUtility\canBeInterpretedAsInteger().

◆ canBeInterpretedAsIntegerReturnsTrue()

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

Definition at line 98 of file MathUtilityTest.php.

References TYPO3\CMS\Core\Utility\MathUtility\canBeInterpretedAsInteger().

◆ convertToPositiveIntegerReturnsTheInputValueForPositiveValues()

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

◆ convertToPositiveIntegerReturnsZeroForNegativeValues()

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

◆ forceIntegerInRangeForcesIntegerIntoDefaultBoundaries()

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

Definition at line 46 of file MathUtilityTest.php.

References TYPO3\CMS\Core\Utility\MathUtility\forceIntegerInRange().

◆ forceIntegerInRangeForcesIntegerIntoDefaultBoundariesDataProvider()

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

Data provider for forceIntegerInRangeForcesIntegerIntoBoundaries

Returns
array expected values, arithmetic expression

Definition at line 32 of file MathUtilityTest.php.

◆ forceIntegerInRangeSetsDefaultValueIfZeroValueIsGiven()

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

◆ functionCanBeInterpretedAsFloatInvalidDataProvider()

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

Data provider for canBeInterpretedAsFloatReturnsFalse

Returns
array Data sets

Definition at line 188 of file MathUtilityTest.php.

◆ functionCanBeInterpretedAsFloatValidDataProvider()

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

Data provider for canBeInterpretedAsFloatReturnsTrue

Returns
array Data sets

Definition at line 157 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 107 of file MathUtilityTest.php.

◆ functionCanBeInterpretedAsIntegerValidDataProvider()

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

Data provider for canBeInterpretedAsIntegerReturnsTrue

Returns
array Data sets

Definition at line 82 of file MathUtilityTest.php.

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

◆ isIntegerInRangeAcceptsValueInRange()

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

◆ isIntegerInRangeIncludesLowerBoundary()

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

◆ isIntegerInRangeIncludesUpperBoundary()

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

◆ isIntegerInRangeRejectsOtherDataTypes()

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

Definition at line 336 of file MathUtilityTest.php.

References TYPO3\CMS\Core\Utility\MathUtility\isIntegerInRange().

◆ isIntegerInRangeRejectsOtherDataTypesDataProvider()

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

Data provider or isIntegerInRangeRejectsOtherDataTypes

Definition at line 320 of file MathUtilityTest.php.

◆ isIntegerInRangeRejectsValueOutsideOfRange()

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