TYPO3CMS  8
 All Classes Namespaces Files Functions Variables Pages
JsonViewTest Class Reference
Inheritance diagram for JsonViewTest:
UnitTestCase BaseTestCase

Public Member Functions

 jsonViewTestData ()
 
 testTransformValue ($object, $configuration, $expected, $description)
 
 objectIdentifierExposureTestData ()
 
 testTransformValueWithObjectIdentifierExposure ($object, $configuration, $expected, $dummyIdentifier, $description)
 
 exposeClassNameSettingsAndResults ()
 
 viewExposesClassNameFullyIfConfiguredSo ($exposeClassNameSetting, $className, $namespace, $expected)
 
 renderSetsContentTypeHeader ()
 
 renderReturnsJsonRepresentationOfAssignedObject ()
 
 renderReturnsJsonRepresentationOfAssignedArray ()
 
 renderReturnsJsonRepresentationOfAssignedSimpleValue ()
 
 renderReturnsNullIfNameOfAssignedVariableIsNotEqualToValue ()
 
 renderOnlyRendersVariableWithTheNameValue ()
 
 setVariablesToRenderOverridesValueToRender ()
 
 renderRendersMultipleValuesIfTheyAreSpecifiedAsVariablesToRender ()
 
 renderCanRenderMultipleComplexObjects ()
 
 renderCanRenderPlainArray ()
 
 descendAllKeepsArrayIndexes ()
 

Protected Member Functions

 setUp ()
 
- Protected Member Functions inherited from UnitTestCase
 tearDown ()
 
- Protected Member Functions inherited from 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,...$arguments)
 
 inject ($target, $name, $dependency)
 
 getUniqueId ($prefix= '')
 

Protected Attributes

 $view
 
 $controllerContext
 
 $response
 
- Protected Attributes inherited from UnitTestCase
 $backupGlobalsBlacklist = ['TYPO3_LOADED_EXT']
 
 $testFilesToDelete = []
 
- Protected Attributes inherited from BaseTestCase
 $backupGlobals = true
 
 $backupStaticAttributes = false
 

Detailed Description

Testcase for the JSON view

Definition at line 23 of file extbase/Tests/Unit/Mvc/View/JsonViewTest.php.

Member Function Documentation

descendAllKeepsArrayIndexes ( )
exposeClassNameSettingsAndResults ( )
jsonViewTestData ( )

data provider for testTransformValue()

Returns
array

Definition at line 59 of file extbase/Tests/Unit/Mvc/View/JsonViewTest.php.

References BaseTestCase\getUniqueId().

objectIdentifierExposureTestData ( )
renderCanRenderMultipleComplexObjects ( )
renderCanRenderPlainArray ( )
renderOnlyRendersVariableWithTheNameValue ( )
renderRendersMultipleValuesIfTheyAreSpecifiedAsVariablesToRender ( )
renderReturnsJsonRepresentationOfAssignedArray ( )
renderReturnsJsonRepresentationOfAssignedObject ( )
renderReturnsJsonRepresentationOfAssignedSimpleValue ( )
renderReturnsNullIfNameOfAssignedVariableIsNotEqualToValue ( )
renderSetsContentTypeHeader ( )
setUp ( )
protected

Sets up this test case

Returns
void

Definition at line 44 of file extbase/Tests/Unit/Mvc/View/JsonViewTest.php.

setVariablesToRenderOverridesValueToRender ( )
testTransformValue (   $object,
  $configuration,
  $expected,
  $description 
)
Test:
jsonViewTestData

Definition at line 158 of file extbase/Tests/Unit/Mvc/View/JsonViewTest.php.

References BaseTestCase\getAccessibleMock().

testTransformValueWithObjectIdentifierExposure (   $object,
  $configuration,
  $expected,
  $dummyIdentifier,
  $description 
)
Test:
objectIdentifierExposureTestData

Definition at line 201 of file extbase/Tests/Unit/Mvc/View/JsonViewTest.php.

References BaseTestCase\getAccessibleMock().

viewExposesClassNameFullyIfConfiguredSo (   $exposeClassNameSetting,
  $className,
  $namespace,
  $expected 
)
Test:
exposeClassNameSettingsAndResults

Definition at line 249 of file extbase/Tests/Unit/Mvc/View/JsonViewTest.php.

References BaseTestCase\getAccessibleMock(), and BaseTestCase\inject().

Member Data Documentation

$controllerContext
protected

Definition at line 33 of file extbase/Tests/Unit/Mvc/View/JsonViewTest.php.

$response
protected

Definition at line 38 of file extbase/Tests/Unit/Mvc/View/JsonViewTest.php.

$view
protected

Definition at line 28 of file extbase/Tests/Unit/Mvc/View/JsonViewTest.php.