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

Public Member Functions

 checkMetadata ()
 
 dataProviderForCanConvert ()
 
 canConvertFromReturnsTrueIfClassIsTaggedWithEntityOrValueObject ($isEntity, $isValueObject, $expected)
 
 getSourceChildPropertiesToBeConvertedReturnsAllPropertiesExceptTheIdentityProperty ()
 
 getTypeOfChildPropertyShouldUseReflectionServiceToDetermineType ()
 
 getTypeOfChildPropertyShouldUseConfiguredTypeIfItWasSet ()
 
 convertFromShouldFetchObjectFromPersistenceIfUuidStringIsGiven ()
 
 convertFromShouldFetchObjectFromPersistenceIfuidStringIsGiven ()
 
 convertFromShouldFetchObjectFromPersistenceIfOnlyIdentityArrayGiven ()
 
 convertFromShouldThrowExceptionIfObjectNeedsToBeModifiedButConfigurationIsNotSet ()
 
 setupMockQuery ($numberOfResults, $howOftenIsGetFirstCalled)
 
 convertFromShouldReturnExceptionIfNoMatchingObjectWasFound ()
 
 convertFromShouldThrowExceptionIfMoreThanOneObjectWasFound ()
 
 convertFromShouldThrowExceptionIfObjectNeedsToBeCreatedButConfigurationIsNotSet ()
 
 convertFromShouldCreateObject ()
 
 convertFromShouldThrowExceptionIfPropertyOnTargetObjectCouldNotBeSet ()
 
 convertFromShouldCreateObjectWhenThereAreConstructorParameters ()
 
 convertFromShouldCreateObjectWhenThereAreOptionalConstructorParameters ()
 
 convertFromShouldThrowExceptionIfRequiredConstructorParameterWasNotFound ()
 
 convertFromShouldReturnNullForEmptyString ()
 

Protected Member Functions

 setUp ()
 
 buildConfiguration ($typeConverterOptions)
 
- 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

 $converter
 
 $mockReflectionService
 
 $mockPersistenceManager
 
 $mockObjectManager
 
 $mockContainer
 
- Protected Attributes inherited from UnitTestCase
 $backupGlobalsBlacklist = ['TYPO3_LOADED_EXT']
 
 $testFilesToDelete = []
 
- Protected Attributes inherited from BaseTestCase
 $backupGlobals = true
 
 $backupStaticAttributes = false
 

Detailed Description

Test case

Definition at line 36 of file PersistentObjectConverterTest.php.

Member Function Documentation

canConvertFromReturnsTrueIfClassIsTaggedWithEntityOrValueObject (   $isEntity,
  $isValueObject,
  $expected 
)
Test:
dataProviderForCanConvert

Definition at line 123 of file PersistentObjectConverterTest.php.

checkMetadata ( )
Test:

Definition at line 97 of file PersistentObjectConverterTest.php.

convertFromShouldCreateObjectWhenThereAreConstructorParameters ( )
convertFromShouldCreateObjectWhenThereAreOptionalConstructorParameters ( )
convertFromShouldFetchObjectFromPersistenceIfOnlyIdentityArrayGiven ( )
Test:

Definition at line 210 of file PersistentObjectConverterTest.php.

convertFromShouldFetchObjectFromPersistenceIfuidStringIsGiven ( )
Test:

Definition at line 198 of file PersistentObjectConverterTest.php.

convertFromShouldFetchObjectFromPersistenceIfUuidStringIsGiven ( )
Test:

Definition at line 186 of file PersistentObjectConverterTest.php.

convertFromShouldReturnExceptionIfNoMatchingObjectWasFound ( )
convertFromShouldReturnNullForEmptyString ( )
Test:

Definition at line 466 of file PersistentObjectConverterTest.php.

convertFromShouldThrowExceptionIfMoreThanOneObjectWasFound ( )
convertFromShouldThrowExceptionIfObjectNeedsToBeCreatedButConfigurationIsNotSet ( )
Test:

Definition at line 321 of file PersistentObjectConverterTest.php.

convertFromShouldThrowExceptionIfObjectNeedsToBeModifiedButConfigurationIsNotSet ( )
Test:

Definition at line 225 of file PersistentObjectConverterTest.php.

convertFromShouldThrowExceptionIfPropertyOnTargetObjectCouldNotBeSet ( )
convertFromShouldThrowExceptionIfRequiredConstructorParameterWasNotFound ( )
dataProviderForCanConvert ( )
Returns
array

Definition at line 107 of file PersistentObjectConverterTest.php.

getSourceChildPropertiesToBeConvertedReturnsAllPropertiesExceptTheIdentityProperty ( )
Test:

Definition at line 138 of file PersistentObjectConverterTest.php.

getTypeOfChildPropertyShouldUseConfiguredTypeIfItWasSet ( )
getTypeOfChildPropertyShouldUseReflectionServiceToDetermineType ( )
setUp ( )
protected
Exceptions
InvalidArgumentException
PHPUnit_Framework_Exception
RuntimeException

Definition at line 68 of file PersistentObjectConverterTest.php.

References BaseTestCase\inject().

setupMockQuery (   $numberOfResults,
  $howOftenIsGetFirstCalled 
)

Member Data Documentation

$converter
protected

Definition at line 41 of file PersistentObjectConverterTest.php.

$mockContainer
protected

Definition at line 61 of file PersistentObjectConverterTest.php.

$mockObjectManager
protected

Definition at line 56 of file PersistentObjectConverterTest.php.

$mockPersistenceManager
protected

Definition at line 51 of file PersistentObjectConverterTest.php.

$mockReflectionService
protected

Definition at line 46 of file PersistentObjectConverterTest.php.