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
5006400c
Commit
5006400c
authored
Jun 14, 2007
by
zYne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
--no commit message
--no commit message
parent
62f72a70
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
9 deletions
+16
-9
MysqlTestCase.php
tests/Export/MysqlTestCase.php
+4
-5
PgsqlTestCase.php
tests/Export/PgsqlTestCase.php
+2
-1
FooRecord.php
tests/Export/_files/FooRecord.php
+6
-2
run.php
tests/run.php
+4
-1
No files found.
tests/Export/MysqlTestCase.php
View file @
5006400c
...
...
@@ -300,15 +300,14 @@ class ForeignKeyTest extends Doctrine_Record
$this
->
hasColumn
(
'parent_id'
,
'integer'
);
$this
->
hasOne
(
'ForeignKeyTest as Parent'
,
'ForeignKeyTest.parent_id'
);
$this
->
hasMany
(
'ForeignKeyTest as Children'
,
'ForeignKeyTest.parent_id'
,
array
(
'onDelete'
=>
'CASCADE'
,
'onUpdate'
=>
'RESTRICT'
)
);
$this
->
hasMany
(
'ForeignKeyTest as Children'
,
'ForeignKeyTest.parent_id'
);
$this
->
option
(
'type'
,
'INNODB'
);
}
...
...
tests/Export/PgsqlTestCase.php
View file @
5006400c
...
...
@@ -80,6 +80,7 @@ class Doctrine_Export_Pgsql_TestCase extends Doctrine_UnitTestCase
public
function
testExportSql
()
{
$sql
=
$this
->
export
->
exportSql
(
dirname
(
__FILE__
)
.
DIRECTORY_SEPARATOR
.
'_files'
);
$this
->
assertEqual
(
$sql
,
array
(
0
=>
'CREATE TABLE foo (id BIGSERIAL, name VARCHAR(200) NOT NULL, parent_id BIGINT, local_foo BIGINT, PRIMARY KEY(id))'
,
1
=>
'CREATE TABLE foo_reference (foo1 BIGINT, foo2 BIGINT, PRIMARY KEY(foo1, foo2))'
,
2
=>
'CREATE TABLE foo_bar_record (fooid BIGINT, barid BIGINT, PRIMARY KEY(fooid, barid))'
,
...
...
tests/Export/_files/FooRecord.php
View file @
5006400c
...
...
@@ -20,7 +20,7 @@ class FooRecord extends Doctrine_Record
$this
->
hasMany
(
'FooRecord as FooParents'
,
array
(
'local'
=>
'foo1'
,
'foreign'
=>
'foo2'
,
'refClass'
=>
'FooReferenceRecord'
,
'onDelete'
=>
'
CASCADE
'
,
'onDelete'
=>
'
RESTRICT
'
,
));
$this
->
hasMany
(
'FooRecord as FooChildren'
,
array
(
'local'
=>
'foo2'
,
...
...
@@ -33,7 +33,11 @@ class FooRecord extends Doctrine_Record
$this
->
hasOne
(
'FooRecord as Parent'
,
array
(
'local'
=>
'parent_id'
,
'foreign'
=>
'id'
,
'onDelete'
=>
'CASCADE'
));
$this
->
hasOne
(
'FooForeignlyOwnedWithPk'
,
array
(
'local'
=>
'id'
,
'foreign'
=>
'id'
,
'constraint'
=>
true
));
$this
->
hasOne
(
'FooLocallyOwned'
,
array
(
'local'
=>
'local_foo'
,
'onDelete'
=>
'RESTRICT'
));
$this
->
hasMany
(
'BarRecord as Bar'
,
array
(
'local'
=>
'fooId'
,
'foreign'
=>
'barId'
,
'refClass'
=>
'FooBarRecord'
));
$this
->
hasMany
(
'BarRecord as Bar'
,
array
(
'local'
=>
'fooId'
,
'foreign'
=>
'barId'
,
'refClass'
=>
'FooBarRecord'
,
'onUpdate'
=>
'RESTRICT'
));
}
}
...
...
tests/run.php
View file @
5006400c
...
...
@@ -68,6 +68,7 @@ $test = new GroupTest('Doctrine Framework Unit Tests');
/** */
// Temp tests
$test
->
addTestCase
(
new
Doctrine_Ticket330_TestCase
());
// Connection drivers (not yet fully tested)
...
...
@@ -122,7 +123,7 @@ $test->addTestCase(new Doctrine_Export_Oracle_TestCase());
$test
->
addTestCase
(
new
Doctrine_Export_Sqlite_TestCase
());
$test
->
addTestCase
(
new
Doctrine_Export_Mysql_TestCase
());
$test
->
addTestCase
(
new
Doctrine_CascadingDelete_TestCase
());
//
$test->addTestCase(new Doctrine_CascadingDelete_TestCase());
// Import module (not yet fully tested)
//$test->addTestCase(new Doctrine_Import_TestCase());
...
...
@@ -175,6 +176,7 @@ $test->addTestCase(new Doctrine_Relation_Parser_TestCase());
// Datatypes
$test
->
addTestCase
(
new
Doctrine_Enum_TestCase
());
$test
->
addTestCase
(
new
Doctrine_Boolean_TestCase
());
...
...
@@ -290,6 +292,7 @@ $test->addTestCase(new Doctrine_Query_JoinCondition_TestCase());
$test
->
addTestCase
(
new
Doctrine_Query_MultipleAggregateValue_TestCase
());
$test
->
addTestCase
(
new
Doctrine_IntegrityAction_TestCase
());
// Cache tests
//$test->addTestCase(new Doctrine_Cache_Query_SqliteTestCase());
//$test->addTestCase(new Doctrine_Cache_FileTestCase());
...
...
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