0.11 Doctrine_Adapter_Mock
Doctrine Adapter Mock
Doctrine mock connection adapter. This class is used for special testing purposes.
Method Summary
| Returns | Name | Description |
|---|---|---|
| addQuery | ||
| beginTransaction | ||
| commit | ||
| integer | count | |
| errorCode | ||
| errorInfo | ||
| exec | ||
| forceException | ||
| forceLastInsertIdFail | ||
| array | getAll | |
| getAttribute | ||
| string | getName | |
| integer | lastInsertId | |
| string | pop | |
| prepare | ||
| query | ||
| string | quote | |
| rollBack | ||
| setAttribute | ||
| sqliteCreateFunction | ||
| __construct | |
Method Details
-
addQuery($query)
Add query to the stack of executed queries
-
beginTransaction()
Begin a transaction
-
commit()
Commit a transaction
-
(integer) count()
Get the number of queries executed
-
errorCode()
-
errorInfo()
-
exec($statement)
Execute a raw sql statement
-
$name Name of exception $message Message for the exception $code Code of the exception forceException($name, $message = '', $code)
Force an exception in to the array of exceptions
-
forceLastInsertIdFail($fail = true)
Force last insert to be failed
-
(array) getAll()
Get all the executed queries
Doctrine_Adapter_Mock
-
getAttribute($attribute)
-
(string) getName()
Get the name of the dbms used in this instance of the mock adapter
Doctrine_Adapter_Mock
-
(integer) lastInsertId()
Get the id of the last inserted record
-
(string) pop()
Pop the last executed query from the array of executed queries and return it
Doctrine_Adapter_Mock
-
$query Query to prepare prepare($query)
Prepare a query statement
Doctrine_Adapter_Mock
-
query($query)
Fake the execution of query and add it to the stack of executed queries
-
(string) quote($input)
Quote a value for the dbms
-
rollBack()
Rollback a transaction
-
setAttribute($attribute, $value)
-
sqliteCreateFunction()
-
__construct($name = null)
Doctrine mock adapter constructor