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
2f4801fe
Commit
2f4801fe
authored
Jan 14, 2007
by
zYne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added tests for sqlite import driver
parent
b3e59ab7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
1 deletion
+29
-1
SqliteTestCase.php
tests/Import/SqliteTestCase.php
+28
-1
UnitTestCase.php
tests/UnitTestCase.php
+1
-0
No files found.
tests/Import/SqliteTestCase.php
View file @
2f4801fe
...
@@ -30,5 +30,32 @@
...
@@ -30,5 +30,32 @@
* @since 1.0
* @since 1.0
* @version $Revision$
* @version $Revision$
*/
*/
class
Doctrine_Import_Sqlite_TestCase
extends
Doctrine_UnitTestCase
{
class
Doctrine_Import_Sqlite_TestCase
extends
Doctrine_UnitTestCase
{
public
function
testListSequencesExecutesSql
()
{
$this
->
import
->
listSequences
(
'table'
);
$this
->
assertEqual
(
$this
->
adapter
->
pop
(),
"SELECT name FROM sqlite_master WHERE type='table' AND sql NOT NULL ORDER BY name"
);
}
public
function
testListTableColumnsExecutesSql
()
{
$this
->
import
->
listTableColumns
(
'table'
);
$this
->
assertEqual
(
$this
->
adapter
->
pop
(),
"PRAGMA table_info(table)"
);
}
public
function
testListTableIndexesExecutesSql
()
{
$this
->
import
->
listTableIndexes
(
'table'
);
$this
->
assertEqual
(
$this
->
adapter
->
pop
(),
"PRAGMA index_list(table)"
);
}
public
function
testListTablesExecutesSql
()
{
$this
->
import
->
listTables
();
$q
=
"SELECT name FROM sqlite_master WHERE type = 'table' UNION ALL SELECT name FROM sqlite_temp_master WHERE type = 'table' ORDER BY name"
;
$this
->
assertEqual
(
$this
->
adapter
->
pop
(),
$q
);
}
}
}
tests/UnitTestCase.php
View file @
2f4801fe
...
@@ -115,6 +115,7 @@ class Doctrine_UnitTestCase extends UnitTestCase {
...
@@ -115,6 +115,7 @@ class Doctrine_UnitTestCase extends UnitTestCase {
$this
->
dataDict
=
$this
->
connection
->
dataDict
;
$this
->
dataDict
=
$this
->
connection
->
dataDict
;
$this
->
expr
=
$this
->
connection
->
expression
;
$this
->
expr
=
$this
->
connection
->
expression
;
$this
->
sequence
=
$this
->
connection
->
sequence
;
$this
->
sequence
=
$this
->
connection
->
sequence
;
$this
->
import
=
$this
->
connection
->
import
;
}
}
$this
->
unitOfWork
=
$this
->
connection
->
unitOfWork
;
$this
->
unitOfWork
=
$this
->
connection
->
unitOfWork
;
$this
->
connection
->
setListener
(
new
Doctrine_EventListener
());
$this
->
connection
->
setListener
(
new
Doctrine_EventListener
());
...
...
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