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

Public Member Functions

 createQueryBuilderReturnsInstanceOfTypo3QueryBuilder ()
 
 quoteIdentifierDataProvider ()
 
 quoteIdentifier (string $input, string $expected)
 
 quoteIdentifiers ()
 
 insertQueriesDataProvider ()
 
 insertQueries (array $args, string $expectedQuery, array $expectedValues, array $expectedTypes)
 
 bulkInsert ()
 
 updateQueriesDataProvider ()
 
 updateQueries (array $args, string $expectedQuery, array $expectedValues, array $expectedTypes)
 
 deleteQueriesDataProvider ()
 
 deleteQueries (array $args, string $expectedQuery, array $expectedValues, array $expectedTypes)
 
 selectQueriesDataProvider ()
 
 selectQueries (array $args, string $expectedQuery, array $expectedParameters)
 
 countQueriesDataProvider ()
 
 countQueries (array $args, string $expectedQuery, array $expectedParameters)
 
 truncateQuery ()
 

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

 $connection
 
 $platform
 
 $testTable = 'testTable'
 
- 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 32 of file ConnectionTest.php.

Member Function Documentation

bulkInsert ( )
Test:

Definition at line 220 of file ConnectionTest.php.

countQueries ( array  $args,
string  $expectedQuery,
array  $expectedParameters 
)
Test:
countQueriesDataProvider
Parameters
array$args
string$expectedQuery
array$expectedParameters

Definition at line 442 of file ConnectionTest.php.

countQueriesDataProvider ( )

Data provider for select query tests

Each array item consists of

  • array of parameters for select call
  • expected SQL string
  • expected named parameter values
Returns
array

Definition at line 414 of file ConnectionTest.php.

createQueryBuilderReturnsInstanceOfTypo3QueryBuilder ( )
Test:

Definition at line 88 of file ConnectionTest.php.

deleteQueries ( array  $args,
string  $expectedQuery,
array  $expectedValues,
array  $expectedTypes 
)
Test:
deleteQueriesDataProvider
Parameters
array$args
string$expectedQuery
array$expectedValues
array$expectedTypes

Definition at line 310 of file ConnectionTest.php.

deleteQueriesDataProvider ( )
Returns
array

Definition at line 278 of file ConnectionTest.php.

References Connection\PARAM_STR.

insertQueries ( array  $args,
string  $expectedQuery,
array  $expectedValues,
array  $expectedTypes 
)
Test:
insertQueriesDataProvider
Parameters
array$args
string$expectedQuery
array$expectedValues
array$expectedTypes

Definition at line 207 of file ConnectionTest.php.

insertQueriesDataProvider ( )
Returns
array

Definition at line 175 of file ConnectionTest.php.

References Connection\PARAM_STR.

quoteIdentifier ( string  $input,
string  $expected 
)
Test:
quoteIdentifierDataProvider
Parameters
string$input
string$expected

Definition at line 149 of file ConnectionTest.php.

quoteIdentifierDataProvider ( )
Returns
array

Definition at line 96 of file ConnectionTest.php.

quoteIdentifiers ( )
Test:

Definition at line 157 of file ConnectionTest.php.

selectQueries ( array  $args,
string  $expectedQuery,
array  $expectedParameters 
)
Test:
selectQueriesDataProvider
Parameters
array$args
string$expectedQuery
array$expectedParameters

Definition at line 392 of file ConnectionTest.php.

selectQueriesDataProvider ( )

Data provider for select query tests

Each array item consists of

  • array of parameters for select call
  • expected SQL string
  • expected named parameter values
Returns
array

Definition at line 330 of file ConnectionTest.php.

setUp ( )
protected

Create a new database connection mock object for every test.

Returns
void

Definition at line 54 of file ConnectionTest.php.

References GeneralUtility\makeInstance().

truncateQuery ( )
Test:

Definition at line 462 of file ConnectionTest.php.

updateQueries ( array  $args,
string  $expectedQuery,
array  $expectedValues,
array  $expectedTypes 
)
Test:
updateQueriesDataProvider
Parameters
array$args
string$expectedQuery
array$expectedValues
array$expectedTypes

Definition at line 265 of file ConnectionTest.php.

updateQueriesDataProvider ( )
Returns
array

Definition at line 233 of file ConnectionTest.php.

References Connection\PARAM_STR.

Member Data Documentation

$connection
protected

Definition at line 37 of file ConnectionTest.php.

$platform
protected

Definition at line 42 of file ConnectionTest.php.

$testTable = 'testTable'
protected

Definition at line 47 of file ConnectionTest.php.