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
0c82cfb0
Commit
0c82cfb0
authored
Feb 16, 2007
by
zYne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
--no commit message
--no commit message
parent
a4167f8d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
140 additions
and
36 deletions
+140
-36
MssqlTestCase.php
tests/DataDict/MssqlTestCase.php
+56
-14
OracleTestCase.php
tests/DataDict/OracleTestCase.php
+84
-22
No files found.
tests/DataDict/MssqlTestCase.php
View file @
0c82cfb0
...
@@ -45,71 +45,113 @@ class Doctrine_DataDict_Mssql_TestCase extends Doctrine_UnitTestCase
...
@@ -45,71 +45,113 @@ class Doctrine_DataDict_Mssql_TestCase extends Doctrine_UnitTestCase
{
{
$type
=
$this
->
dataDict
->
getPortableDeclaration
(
array
(
'type'
=>
'bit'
));
$type
=
$this
->
dataDict
->
getPortableDeclaration
(
array
(
'type'
=>
'bit'
));
$this
->
assertEqual
(
$type
,
array
(
array
(
'boolean'
),
null
,
null
,
null
));
$this
->
assertEqual
(
$type
,
array
(
'type'
=>
array
(
'boolean'
),
'length'
=>
null
,
'unsigned'
=>
null
,
'fixed'
=>
null
));
}
}
public
function
testGetPortableDeclarationSupportsNativeStringTypes
()
public
function
testGetPortableDeclarationSupportsNativeStringTypes
()
{
{
$type
=
$this
->
dataDict
->
getPortableDeclaration
(
array
(
'type'
=>
'text'
));
$type
=
$this
->
dataDict
->
getPortableDeclaration
(
array
(
'type'
=>
'text'
));
$this
->
assertEqual
(
$type
,
array
(
array
(
'string'
,
'clob'
),
null
,
null
,
null
));
$this
->
assertEqual
(
$type
,
array
(
'type'
=>
array
(
'string'
,
'clob'
),
'length'
=>
null
,
'unsigned'
=>
null
,
'fixed'
=>
null
));
$type
=
$this
->
dataDict
->
getPortableDeclaration
(
array
(
'type'
=>
'char'
,
'length'
=>
1
));
$type
=
$this
->
dataDict
->
getPortableDeclaration
(
array
(
'type'
=>
'char'
,
'length'
=>
1
));
$this
->
assertEqual
(
$type
,
array
(
array
(
'string'
,
'boolean'
),
1
,
null
,
true
));
$this
->
assertEqual
(
$type
,
array
(
'type'
=>
array
(
'string'
,
'boolean'
),
'length'
=>
1
,
'unsigned'
=>
null
,
'fixed'
=>
true
));
$type
=
$this
->
dataDict
->
getPortableDeclaration
(
array
(
'type'
=>
'varchar'
,
'length'
=>
1
));
$type
=
$this
->
dataDict
->
getPortableDeclaration
(
array
(
'type'
=>
'varchar'
,
'length'
=>
1
));
$this
->
assertEqual
(
$type
,
array
(
array
(
'string'
,
'boolean'
),
1
,
null
,
false
));
$this
->
assertEqual
(
$type
,
array
(
'type'
=>
array
(
'string'
,
'boolean'
),
'length'
=>
1
,
'unsigned'
=>
null
,
'fixed'
=>
false
));
}
}
public
function
testGetPortableDeclarationSupportsNativeBlobTypes
()
public
function
testGetPortableDeclarationSupportsNativeBlobTypes
()
{
{
$type
=
$this
->
dataDict
->
getPortableDeclaration
(
array
(
'type'
=>
'image'
));
$type
=
$this
->
dataDict
->
getPortableDeclaration
(
array
(
'type'
=>
'image'
));
$this
->
assertEqual
(
$type
,
array
(
array
(
'blob'
),
null
,
null
,
null
));
$this
->
assertEqual
(
$type
,
array
(
'type'
=>
array
(
'blob'
),
'length'
=>
null
,
'unsigned'
=>
null
,
'fixed'
=>
null
));
$type
=
$this
->
dataDict
->
getPortableDeclaration
(
array
(
'type'
=>
'varbinary'
));
$type
=
$this
->
dataDict
->
getPortableDeclaration
(
array
(
'type'
=>
'varbinary'
));
$this
->
assertEqual
(
$type
,
array
(
array
(
'blob'
),
null
,
null
,
null
));
$this
->
assertEqual
(
$type
,
array
(
'type'
=>
array
(
'blob'
),
'length'
=>
null
,
'unsigned'
=>
null
,
'fixed'
=>
null
));
}
}
public
function
testGetPortableDeclarationSupportsNativeIntegerTypes
()
public
function
testGetPortableDeclarationSupportsNativeIntegerTypes
()
{
{
$type
=
$this
->
dataDict
->
getPortableDeclaration
(
array
(
'type'
=>
'int'
));
$type
=
$this
->
dataDict
->
getPortableDeclaration
(
array
(
'type'
=>
'int'
));
$this
->
assertEqual
(
$type
,
array
(
array
(
'integer'
),
null
,
null
,
null
));
$this
->
assertEqual
(
$type
,
array
(
'type'
=>
array
(
'integer'
),
'length'
=>
null
,
'unsigned'
=>
null
,
'fixed'
=>
null
));
$type
=
$this
->
dataDict
->
getPortableDeclaration
(
array
(
'type'
=>
'int'
,
'length'
=>
1
));
$type
=
$this
->
dataDict
->
getPortableDeclaration
(
array
(
'type'
=>
'int'
,
'length'
=>
1
));
$this
->
assertEqual
(
$type
,
array
(
array
(
'integer'
,
'boolean'
),
1
,
null
,
null
));
$this
->
assertEqual
(
$type
,
array
(
'type'
=>
array
(
'integer'
,
'boolean'
),
'length'
=>
1
,
'unsigned'
=>
null
,
'fixed'
=>
null
));
}
}
public
function
testGetPortableDeclarationSupportsNativeTimestampType
()
public
function
testGetPortableDeclarationSupportsNativeTimestampType
()
{
{
$type
=
$this
->
dataDict
->
getPortableDeclaration
(
array
(
'type'
=>
'datetime'
));
$type
=
$this
->
dataDict
->
getPortableDeclaration
(
array
(
'type'
=>
'datetime'
));
$this
->
assertEqual
(
$type
,
array
(
array
(
'timestamp'
),
null
,
null
,
null
));
$this
->
assertEqual
(
$type
,
array
(
'type'
=>
array
(
'timestamp'
),
'length'
=>
null
,
'unsigned'
=>
null
,
'fixed'
=>
null
));
}
}
public
function
testGetPortableDeclarationSupportsNativeDecimalTypes
()
public
function
testGetPortableDeclarationSupportsNativeDecimalTypes
()
{
{
$type
=
$this
->
dataDict
->
getPortableDeclaration
(
array
(
'type'
=>
'decimal'
));
$type
=
$this
->
dataDict
->
getPortableDeclaration
(
array
(
'type'
=>
'decimal'
));
$this
->
assertEqual
(
$type
,
array
(
array
(
'decimal'
),
null
,
null
,
null
));
$this
->
assertEqual
(
$type
,
array
(
'type'
=>
array
(
'decimal'
),
'length'
=>
null
,
'unsigned'
=>
null
,
'fixed'
=>
null
));
$type
=
$this
->
dataDict
->
getPortableDeclaration
(
array
(
'type'
=>
'money'
));
$type
=
$this
->
dataDict
->
getPortableDeclaration
(
array
(
'type'
=>
'money'
));
$this
->
assertEqual
(
$type
,
array
(
array
(
'decimal'
),
null
,
null
,
null
));
$this
->
assertEqual
(
$type
,
array
(
'type'
=>
array
(
'decimal'
),
'length'
=>
null
,
'unsigned'
=>
null
,
'fixed'
=>
null
));
}
}
public
function
testGetPortableDeclarationSupportsNativeFloatTypes
()
public
function
testGetPortableDeclarationSupportsNativeFloatTypes
()
{
{
$type
=
$this
->
dataDict
->
getPortableDeclaration
(
array
(
'type'
=>
'float'
));
$type
=
$this
->
dataDict
->
getPortableDeclaration
(
array
(
'type'
=>
'float'
));
$this
->
assertEqual
(
$type
,
array
(
array
(
'float'
),
null
,
null
,
null
));
$this
->
assertEqual
(
$type
,
array
(
'type'
=>
array
(
'float'
),
'length'
=>
null
,
'unsigned'
=>
null
,
'fixed'
=>
null
));
$type
=
$this
->
dataDict
->
getPortableDeclaration
(
array
(
'type'
=>
'real'
));
$type
=
$this
->
dataDict
->
getPortableDeclaration
(
array
(
'type'
=>
'real'
));
$this
->
assertEqual
(
$type
,
array
(
array
(
'float'
),
null
,
null
,
null
));
$this
->
assertEqual
(
$type
,
array
(
'type'
=>
array
(
'float'
),
'length'
=>
null
,
'unsigned'
=>
null
,
'fixed'
=>
null
));
$type
=
$this
->
dataDict
->
getPortableDeclaration
(
array
(
'type'
=>
'numeric'
));
$type
=
$this
->
dataDict
->
getPortableDeclaration
(
array
(
'type'
=>
'numeric'
));
$this
->
assertEqual
(
$type
,
array
(
array
(
'float'
),
null
,
null
,
null
));
$this
->
assertEqual
(
$type
,
array
(
'type'
=>
array
(
'float'
),
'length'
=>
null
,
'unsigned'
=>
null
,
'fixed'
=>
null
));
}
}
public
function
testGetNativeDefinitionSupportsIntegerType
()
public
function
testGetNativeDefinitionSupportsIntegerType
()
{
{
...
...
tests/DataDict/OracleTestCase.php
View file @
0c82cfb0
...
@@ -44,96 +44,158 @@ class Doctrine_DataDict_Oracle_TestCase extends Doctrine_UnitTestCase {
...
@@ -44,96 +44,158 @@ class Doctrine_DataDict_Oracle_TestCase extends Doctrine_UnitTestCase {
{
{
$type
=
$this
->
dataDict
->
getPortableDeclaration
(
array
(
'type'
=>
'float'
));
$type
=
$this
->
dataDict
->
getPortableDeclaration
(
array
(
'type'
=>
'float'
));
$this
->
assertEqual
(
$type
,
array
(
array
(
'float'
),
null
,
null
,
null
));
$this
->
assertEqual
(
$type
,
array
(
'type'
=>
array
(
'float'
),
'length'
=>
null
,
'unsigned'
=>
null
,
'fixed'
=>
null
));
}
}
public
function
testGetPortableDeclarationSupportsNativeIntegerTypes
()
public
function
testGetPortableDeclarationSupportsNativeIntegerTypes
()
{
{
$type
=
$this
->
dataDict
->
getPortableDeclaration
(
array
(
'type'
=>
'integer'
));
$type
=
$this
->
dataDict
->
getPortableDeclaration
(
array
(
'type'
=>
'integer'
));
$this
->
assertEqual
(
$type
,
array
(
array
(
'integer'
),
null
,
null
,
null
));
$this
->
assertEqual
(
$type
,
array
(
'type'
=>
array
(
'integer'
),
'length'
=>
null
,
'unsigned'
=>
null
,
'fixed'
=>
null
));
$type
=
$this
->
dataDict
->
getPortableDeclaration
(
array
(
'type'
=>
'pls_integer'
,
'length'
=>
1
));
$type
=
$this
->
dataDict
->
getPortableDeclaration
(
array
(
'type'
=>
'pls_integer'
,
'length'
=>
1
));
$this
->
assertEqual
(
$type
,
array
(
array
(
'integer'
,
'boolean'
),
1
,
null
,
null
));
$this
->
assertEqual
(
$type
,
array
(
'type'
=>
array
(
'integer'
,
'boolean'
),
'length'
=>
1
,
'unsigned'
=>
null
,
'fixed'
=>
null
));
$type
=
$this
->
dataDict
->
getPortableDeclaration
(
array
(
'type'
=>
'binary_integer'
,
'length'
=>
1
));
$type
=
$this
->
dataDict
->
getPortableDeclaration
(
array
(
'type'
=>
'binary_integer'
,
'length'
=>
1
));
$this
->
assertEqual
(
$type
,
array
(
array
(
'integer'
,
'boolean'
),
1
,
null
,
null
));
$this
->
assertEqual
(
$type
,
array
(
'type'
=>
array
(
'integer'
,
'boolean'
),
'length'
=>
1
,
'unsigned'
=>
null
,
'fixed'
=>
null
));
}
}
public
function
testGetPortableDeclarationSupportsNativeStringTypes
()
public
function
testGetPortableDeclarationSupportsNativeStringTypes
()
{
{
$type
=
$this
->
dataDict
->
getPortableDeclaration
(
array
(
'type'
=>
'varchar'
));
$type
=
$this
->
dataDict
->
getPortableDeclaration
(
array
(
'type'
=>
'varchar'
));
$this
->
assertEqual
(
$type
,
array
(
array
(
'string'
),
null
,
null
,
null
));
$this
->
assertEqual
(
$type
,
array
(
'type'
=>
array
(
'string'
),
'length'
=>
null
,
'unsigned'
=>
null
,
'fixed'
=>
null
));
$type
=
$this
->
dataDict
->
getPortableDeclaration
(
array
(
'type'
=>
'varchar2'
,
'length'
=>
1
));
$type
=
$this
->
dataDict
->
getPortableDeclaration
(
array
(
'type'
=>
'varchar2'
,
'length'
=>
1
));
$this
->
assertEqual
(
$type
,
array
(
array
(
'string'
,
'boolean'
),
1
,
null
,
false
));
$this
->
assertEqual
(
$type
,
array
(
'type'
=>
array
(
'string'
,
'boolean'
),
'length'
=>
1
,
'unsigned'
=>
null
,
'fixed'
=>
false
));
$type
=
$this
->
dataDict
->
getPortableDeclaration
(
array
(
'type'
=>
'nvarchar2'
,
'length'
=>
1
));
$type
=
$this
->
dataDict
->
getPortableDeclaration
(
array
(
'type'
=>
'nvarchar2'
,
'length'
=>
1
));
$this
->
assertEqual
(
$type
,
array
(
array
(
'string'
,
'boolean'
),
1
,
null
,
false
));
$this
->
assertEqual
(
$type
,
array
(
'type'
=>
array
(
'string'
,
'boolean'
),
'length'
=>
1
,
'unsigned'
=>
null
,
'fixed'
=>
false
));
$type
=
$this
->
dataDict
->
getPortableDeclaration
(
array
(
'type'
=>
'char'
,
'length'
=>
1
));
$type
=
$this
->
dataDict
->
getPortableDeclaration
(
array
(
'type'
=>
'char'
,
'length'
=>
1
));
$this
->
assertEqual
(
$type
,
array
(
array
(
'string'
,
'boolean'
),
1
,
null
,
true
));
$this
->
assertEqual
(
$type
,
array
(
'type'
=>
array
(
'string'
,
'boolean'
),
'length'
=>
1
,
'unsigned'
=>
null
,
'fixed'
=>
true
));
$type
=
$this
->
dataDict
->
getPortableDeclaration
(
array
(
'type'
=>
'nchar'
,
'length'
=>
1
));
$type
=
$this
->
dataDict
->
getPortableDeclaration
(
array
(
'type'
=>
'nchar'
,
'length'
=>
1
));
$this
->
assertEqual
(
$type
,
array
(
array
(
'string'
,
'boolean'
),
1
,
null
,
true
));
$this
->
assertEqual
(
$type
,
array
(
'type'
=>
array
(
'string'
,
'boolean'
),
'length'
=>
1
,
'unsigned'
=>
null
,
'fixed'
=>
true
));
}
}
public
function
testGetPortableDeclarationSupportsNativeNumberType
()
public
function
testGetPortableDeclarationSupportsNativeNumberType
()
{
{
$type
=
$this
->
dataDict
->
getPortableDeclaration
(
array
(
'type'
=>
'number'
));
$type
=
$this
->
dataDict
->
getPortableDeclaration
(
array
(
'type'
=>
'number'
));
$this
->
assertEqual
(
$type
,
array
(
array
(
'integer'
),
null
,
null
,
null
));
$this
->
assertEqual
(
$type
,
array
(
'type'
=>
array
(
'integer'
),
'length'
=>
null
,
'unsigned'
=>
null
,
'fixed'
=>
null
));
$type
=
$this
->
dataDict
->
getPortableDeclaration
(
array
(
'type'
=>
'number'
,
'length'
=>
1
));
$type
=
$this
->
dataDict
->
getPortableDeclaration
(
array
(
'type'
=>
'number'
,
'length'
=>
1
));
$this
->
assertEqual
(
$type
,
array
(
array
(
'integer'
,
'boolean'
),
1
,
null
,
null
));
$this
->
assertEqual
(
$type
,
array
(
'type'
=>
array
(
'integer'
,
'boolean'
),
'length'
=>
1
,
'unsigned'
=>
null
,
'fixed'
=>
null
));
}
}
public
function
testGetPortableDeclarationSupportsNativeTimestampType
()
public
function
testGetPortableDeclarationSupportsNativeTimestampType
()
{
{
$type
=
$this
->
dataDict
->
getPortableDeclaration
(
array
(
'type'
=>
'date'
));
$type
=
$this
->
dataDict
->
getPortableDeclaration
(
array
(
'type'
=>
'date'
));
$this
->
assertEqual
(
$type
,
array
(
array
(
'timestamp'
),
null
,
null
,
null
));
$this
->
assertEqual
(
$type
,
array
(
'type'
=>
array
(
'timestamp'
),
'length'
=>
null
,
'unsigned'
=>
null
,
'fixed'
=>
null
));
$type
=
$this
->
dataDict
->
getPortableDeclaration
(
array
(
'type'
=>
'timestamp'
));
$type
=
$this
->
dataDict
->
getPortableDeclaration
(
array
(
'type'
=>
'timestamp'
));
$this
->
assertEqual
(
$type
,
array
(
array
(
'timestamp'
),
null
,
null
,
null
));
$this
->
assertEqual
(
$type
,
array
(
'type'
=>
array
(
'timestamp'
),
'length'
=>
null
,
'unsigned'
=>
null
,
'fixed'
=>
null
));
}
}
public
function
testGetPortableDeclarationSupportsNativeClobTypes
()
public
function
testGetPortableDeclarationSupportsNativeClobTypes
()
{
{
$type
=
$this
->
dataDict
->
getPortableDeclaration
(
array
(
'type'
=>
'clob'
));
$type
=
$this
->
dataDict
->
getPortableDeclaration
(
array
(
'type'
=>
'clob'
));
$this
->
assertEqual
(
$type
,
array
(
array
(
'clob'
),
null
,
null
,
null
));
$this
->
assertEqual
(
$type
,
array
(
'type'
=>
array
(
'clob'
),
'length'
=>
null
,
'unsigned'
=>
null
,
'fixed'
=>
null
));
$type
=
$this
->
dataDict
->
getPortableDeclaration
(
array
(
'type'
=>
'long'
));
$type
=
$this
->
dataDict
->
getPortableDeclaration
(
array
(
'type'
=>
'long'
));
$this
->
assertEqual
(
$type
,
array
(
array
(
'string'
,
'clob'
),
null
,
null
,
null
));
$this
->
assertEqual
(
$type
,
array
(
'type'
=>
array
(
'string'
,
'clob'
),
'length'
=>
null
,
'unsigned'
=>
null
,
'fixed'
=>
null
));
$type
=
$this
->
dataDict
->
getPortableDeclaration
(
array
(
'type'
=>
'nclob'
));
$type
=
$this
->
dataDict
->
getPortableDeclaration
(
array
(
'type'
=>
'nclob'
));
$this
->
assertEqual
(
$type
,
array
(
array
(
'clob'
),
null
,
null
,
null
));
$this
->
assertEqual
(
$type
,
array
(
'type'
=>
array
(
'clob'
),
'length'
=>
null
,
'unsigned'
=>
null
,
'fixed'
=>
null
));
}
}
public
function
testGetPortableDeclarationSupportsNativeBlobTypes
()
public
function
testGetPortableDeclarationSupportsNativeBlobTypes
()
{
{
$type
=
$this
->
dataDict
->
getPortableDeclaration
(
array
(
'type'
=>
'blob'
));
$type
=
$this
->
dataDict
->
getPortableDeclaration
(
array
(
'type'
=>
'blob'
));
$this
->
assertEqual
(
$type
,
array
(
array
(
'blob'
),
null
,
null
,
null
));
$this
->
assertEqual
(
$type
,
array
(
'type'
=>
array
(
'blob'
),
'length'
=>
null
,
'unsigned'
=>
null
,
'fixed'
=>
null
));
$type
=
$this
->
dataDict
->
getPortableDeclaration
(
array
(
'type'
=>
'long raw'
));
$type
=
$this
->
dataDict
->
getPortableDeclaration
(
array
(
'type'
=>
'long raw'
));
$this
->
assertEqual
(
$type
,
array
(
array
(
'blob'
),
null
,
null
,
null
));
$this
->
assertEqual
(
$type
,
array
(
'type'
=>
array
(
'blob'
),
'length'
=>
null
,
'unsigned'
=>
null
,
'fixed'
=>
null
));
$type
=
$this
->
dataDict
->
getPortableDeclaration
(
array
(
'type'
=>
'long raw'
));
$type
=
$this
->
dataDict
->
getPortableDeclaration
(
array
(
'type'
=>
'long raw'
));
$this
->
assertEqual
(
$type
,
array
(
array
(
'blob'
),
null
,
null
,
null
));
$this
->
assertEqual
(
$type
,
array
(
'type'
=>
array
(
'blob'
),
'length'
=>
null
,
'unsigned'
=>
null
,
'fixed'
=>
null
));
$type
=
$this
->
dataDict
->
getPortableDeclaration
(
array
(
'type'
=>
'raw'
));
$type
=
$this
->
dataDict
->
getPortableDeclaration
(
array
(
'type'
=>
'raw'
));
$this
->
assertEqual
(
$type
,
array
(
array
(
'blob'
),
null
,
null
,
null
));
$this
->
assertEqual
(
$type
,
array
(
'type'
=>
array
(
'blob'
),
'length'
=>
null
,
'unsigned'
=>
null
,
'fixed'
=>
null
));
}
}
public
function
testGetNativeDefinitionSupportsIntegerType
()
public
function
testGetNativeDefinitionSupportsIntegerType
()
{
{
...
...
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