Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
doctrine-dbal
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tomáš Trávníček
doctrine-dbal
Commits
609a228d
Commit
609a228d
authored
Jan 08, 2007
by
zYne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added some tests for sqlite sequence driver
parent
bd46df21
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
0 deletions
+21
-0
SqliteTestCase.php
tests/Sequence/SqliteTestCase.php
+21
-0
No files found.
tests/Sequence/SqliteTestCase.php
View file @
609a228d
...
...
@@ -31,4 +31,25 @@
* @version $Revision$
*/
class
Doctrine_Sequence_Sqlite_TestCase
extends
Doctrine_UnitTestCase
{
public
function
testCurrIdExecutesSql
()
{
$this
->
sequence
->
currId
(
'user'
);
$this
->
assertEqual
(
$this
->
adapter
->
pop
(),
'SELECT MAX(id) FROM user_seq'
);
}
public
function
testNextIdExecutesSql
()
{
$id
=
$this
->
sequence
->
nextId
(
'user'
);
$this
->
assertEqual
(
$id
,
1
);
$this
->
assertEqual
(
$this
->
adapter
->
pop
(),
'DELETE FROM user_seq WHERE id < 1'
);
$this
->
assertEqual
(
$this
->
adapter
->
pop
(),
'LAST_INSERT_ID()'
);
$this
->
assertEqual
(
$this
->
adapter
->
pop
(),
'INSERT INTO user_seq (id) VALUES (NULL)'
);
}
public
function
testLastInsertIdCallsPdoLevelEquivalent
()
{
$id
=
$this
->
sequence
->
lastInsertId
(
'user'
);
$this
->
assertEqual
(
$id
,
1
);
$this
->
assertEqual
(
$this
->
adapter
->
pop
(),
'LAST_INSERT_ID()'
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment