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

Public Member Functions

 abstractRepositoryImplementsRepositoryInterface ()
 
 createQueryCallsPersistenceManagerWithExpectedClassName ()
 
 createQuerySetsDefaultOrderingIfDefined ()
 
 findAllCreatesQueryAndReturnsResultOfExecuteCall ()
 
 findByidentifierReturnsResultOfGetObjectByIdentifierCallFromBackend ()
 
 addDelegatesToPersistenceManager ()
 
 removeDelegatesToPersistenceManager ()
 
 updateDelegatesToPersistenceManager ()
 
 magicCallMethodAcceptsFindBySomethingCallsAndExecutesAQueryWithThatCriteria ()
 
 magicCallMethodAcceptsFindOneBySomethingCallsAndExecutesAQueryWithThatCriteria ()
 
 magicCallMethodAcceptsCountBySomethingCallsAndExecutesAQueryWithThatCriteria ()
 
 magicCallMethodTriggersAnErrorIfUnknownMethodsAreCalled ()
 
 addChecksObjectType ()
 
 removeChecksObjectType ()
 
 updateChecksObjectType ()
 
 modelAndRepositoryClassNames ()
 
 constructSetsObjectTypeFromClassName ($repositoryClassName, $modelClassName)
 
 createQueryReturnsQueryWithUnmodifiedDefaultQuerySettings ()
 
 findByUidReturnsResultOfGetObjectByIdentifierCall ()
 
 updateRejectsObjectsOfWrongType ()
 
 magicCallMethodReturnsFirstArrayKeyInFindOneBySomethingIfQueryReturnsRawResult ()
 
 magicCallMethodReturnsNullInFindOneBySomethingIfQueryReturnsEmptyRawResult ()
 

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

 $repository
 
 $mockObjectManager
 
 $mockQueryFactory
 
 $mockBackend
 
 $mockSession
 
 $mockPersistenceManager
 
 $mockQuery
 
 $mockQuerySettings
 
 $mockConfigurationManager
 
- 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 22 of file RepositoryTest.php.

Member Function Documentation

abstractRepositoryImplementsRepositoryInterface ( )
Test:

Definition at line 93 of file RepositoryTest.php.

addChecksObjectType ( )
Test:

Definition at line 291 of file RepositoryTest.php.

addDelegatesToPersistenceManager ( )
constructSetsObjectTypeFromClassName (   $repositoryClassName,
  $modelClassName 
)
Test:
modelAndRepositoryClassNames
Parameters
string$repositoryClassName
string$modelClassName

Definition at line 345 of file RepositoryTest.php.

createQueryCallsPersistenceManagerWithExpectedClassName ( )
createQueryReturnsQueryWithUnmodifiedDefaultQuerySettings ( )
Test:

Definition at line 363 of file RepositoryTest.php.

createQuerySetsDefaultOrderingIfDefined ( )
findAllCreatesQueryAndReturnsResultOfExecuteCall ( )
findByidentifierReturnsResultOfGetObjectByIdentifierCallFromBackend ( )
Test:

Definition at line 154 of file RepositoryTest.php.

findByUidReturnsResultOfGetObjectByIdentifierCall ( )
Test:

Definition at line 377 of file RepositoryTest.php.

magicCallMethodAcceptsCountBySomethingCallsAndExecutesAQueryWithThatCriteria ( )
magicCallMethodAcceptsFindBySomethingCallsAndExecutesAQueryWithThatCriteria ( )
magicCallMethodAcceptsFindOneBySomethingCallsAndExecutesAQueryWithThatCriteria ( )
magicCallMethodReturnsFirstArrayKeyInFindOneBySomethingIfQueryReturnsRawResult ( )
Test:

Definition at line 405 of file RepositoryTest.php.

magicCallMethodReturnsNullInFindOneBySomethingIfQueryReturnsEmptyRawResult ( )
Test:

Definition at line 422 of file RepositoryTest.php.

magicCallMethodTriggersAnErrorIfUnknownMethodsAreCalled ( )
Test:

Definition at line 277 of file RepositoryTest.php.

References RepositoryTest\$repository.

modelAndRepositoryClassNames ( )

dataProvider for createQueryCallsQueryFactoryWithExpectedType

Returns
array

Definition at line 328 of file RepositoryTest.php.

removeChecksObjectType ( )
Test:

Definition at line 302 of file RepositoryTest.php.

removeDelegatesToPersistenceManager ( )
setUp ( )
protected

Definition at line 69 of file RepositoryTest.php.

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

updateChecksObjectType ( )
updateDelegatesToPersistenceManager ( )
updateRejectsObjectsOfWrongType ( )
Test:

Definition at line 394 of file RepositoryTest.php.

Member Data Documentation

$mockBackend
protected

Definition at line 42 of file RepositoryTest.php.

$mockConfigurationManager
protected

Definition at line 67 of file RepositoryTest.php.

$mockObjectManager
protected

Definition at line 32 of file RepositoryTest.php.

$mockQueryFactory
protected

Definition at line 37 of file RepositoryTest.php.

$mockQuerySettings
protected

Definition at line 62 of file RepositoryTest.php.

$mockSession
protected

Definition at line 47 of file RepositoryTest.php.