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
8b969d03
Commit
8b969d03
authored
Nov 27, 2006
by
zYne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added tests for oracle datadict driver
parent
c6f5546f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
105 additions
and
4 deletions
+105
-4
OracleTestCase.php
tests/DataDict/OracleTestCase.php
+85
-0
run.php
tests/run.php
+20
-4
No files found.
tests/DataDict/OracleTestCase.php
0 → 100644
View file @
8b969d03
<?php
class
Doctrine_DataDict_Oracle_TestCase
extends
Doctrine_Driver_UnitTestCase
{
public
function
__construct
()
{
parent
::
__construct
(
'oci'
);
}
public
function
testGetNativeDefinitionSupportsIntegerType
()
{
$a
=
array
(
'type'
=>
'integer'
,
'length'
=>
20
,
'fixed'
=>
false
);
$this
->
assertEqual
(
$this
->
dataDict
->
getNativeDeclaration
(
$a
),
'NUMBER(20)'
);
$a
[
'length'
]
=
4
;
$this
->
assertEqual
(
$this
->
dataDict
->
getNativeDeclaration
(
$a
),
'NUMBER(4)'
);
$a
[
'length'
]
=
2
;
$this
->
assertEqual
(
$this
->
dataDict
->
getNativeDeclaration
(
$a
),
'NUMBER(2)'
);
}
public
function
testGetNativeDefinitionSupportsFloatType
()
{
$a
=
array
(
'type'
=>
'float'
,
'length'
=>
20
,
'fixed'
=>
false
);
$this
->
assertEqual
(
$this
->
dataDict
->
getNativeDeclaration
(
$a
),
'NUMBER'
);
}
public
function
testGetNativeDefinitionSupportsBooleanType
()
{
$a
=
array
(
'type'
=>
'boolean'
,
'fixed'
=>
false
);
$this
->
assertEqual
(
$this
->
dataDict
->
getNativeDeclaration
(
$a
),
'NUMBER(1)'
);
}
public
function
testGetNativeDefinitionSupportsDateType
()
{
$a
=
array
(
'type'
=>
'date'
,
'fixed'
=>
false
);
$this
->
assertEqual
(
$this
->
dataDict
->
getNativeDeclaration
(
$a
),
'DATE'
);
}
public
function
testGetNativeDefinitionSupportsTimestampType
()
{
$a
=
array
(
'type'
=>
'timestamp'
,
'fixed'
=>
false
);
$this
->
assertEqual
(
$this
->
dataDict
->
getNativeDeclaration
(
$a
),
'DATE'
);
}
public
function
testGetNativeDefinitionSupportsTimeType
()
{
$a
=
array
(
'type'
=>
'time'
,
'fixed'
=>
false
);
$this
->
assertEqual
(
$this
->
dataDict
->
getNativeDeclaration
(
$a
),
'DATE'
);
}
public
function
testGetNativeDefinitionSupportsClobType
()
{
$a
=
array
(
'type'
=>
'clob'
);
$this
->
assertEqual
(
$this
->
dataDict
->
getNativeDeclaration
(
$a
),
'CLOB'
);
}
public
function
testGetNativeDefinitionSupportsBlobType
()
{
$a
=
array
(
'type'
=>
'blob'
);
$this
->
assertEqual
(
$this
->
dataDict
->
getNativeDeclaration
(
$a
),
'BLOB'
);
}
public
function
testGetNativeDefinitionSupportsCharType
()
{
$a
=
array
(
'type'
=>
'char'
,
'length'
=>
10
);
$this
->
assertEqual
(
$this
->
dataDict
->
getNativeDeclaration
(
$a
),
'CHAR(10)'
);
}
public
function
testGetNativeDefinitionSupportsVarcharType
()
{
$a
=
array
(
'type'
=>
'varchar'
,
'length'
=>
10
);
$this
->
assertEqual
(
$this
->
dataDict
->
getNativeDeclaration
(
$a
),
'VARCHAR2(10)'
);
}
public
function
testGetNativeDefinitionSupportsArrayType
()
{
$a
=
array
(
'type'
=>
'array'
,
'length'
=>
40
);
$this
->
assertEqual
(
$this
->
dataDict
->
getNativeDeclaration
(
$a
),
'VARCHAR2(40)'
);
}
public
function
testGetNativeDefinitionSupportsStringType
()
{
$a
=
array
(
'type'
=>
'string'
);
$this
->
assertEqual
(
$this
->
dataDict
->
getNativeDeclaration
(
$a
),
'VARCHAR2(16777215)'
);
}
public
function
testGetNativeDefinitionSupportsArrayType2
()
{
$a
=
array
(
'type'
=>
'array'
);
$this
->
assertEqual
(
$this
->
dataDict
->
getNativeDeclaration
(
$a
),
'VARCHAR2(16777215)'
);
}
public
function
testGetNativeDefinitionSupportsObjectType
()
{
$a
=
array
(
'type'
=>
'object'
);
$this
->
assertEqual
(
$this
->
dataDict
->
getNativeDeclaration
(
$a
),
'VARCHAR2(16777215)'
);
}
}
tests/run.php
View file @
8b969d03
...
...
@@ -61,6 +61,9 @@ require_once('EnumTestCase.php');
require_once
(
'DataDictSqliteTestCase.php'
);
require_once
(
'DataDict/PgsqlTestCase.php'
);
require_once
(
'DataDict/SqliteTestCase.php'
);
require_once
(
'DataDict/MysqlTestCase.php'
);
require_once
(
'DataDict/OracleTestCase.php'
);
require_once
(
'ExportTestCase.php'
);
require_once
(
'ExportMysqlTestCase.php'
);
...
...
@@ -76,16 +79,30 @@ require_once('TransactionFirebirdTestCase.php');
require_once
(
'TransactionMssqlTestCase.php'
);
require_once
(
'TransactionSqliteTestCase.php'
);
require_once
(
'Connection/MysqlTestCase.php'
);
require_once
(
'CustomResultSetOrderTestCase.php'
);
error_reporting
(
E_ALL
);
print
'<pre>'
;
$test
=
new
GroupTest
(
'Doctrine Framework Unit Tests'
);
$test
->
addTestCase
(
new
Doctrine_Connection_Mysql_TestCase
());
$test
->
addTestCase
(
new
Doctrine_Export_Mysql_TestCase
());
$test
->
addTestCase
(
new
Doctrine_DataDict_Pgsql_TestCase
());
$test
->
addTestCase
(
new
Doctrine_DataDict_Mysql_TestCase
());
$test
->
addTestCase
(
new
Doctrine_DataDict_Oracle_TestCase
());
/**
$test->addTestCase(new Doctrine_DataDict_Sqlite_TestCase());
$test->addTestCase(new Doctrine_Configurable_TestCase());
$test->addTestCase(new Doctrine_Export_Mysql_TestCase());
$test->addTestCase(new Doctrine_Export_Firebird_TestCase());
...
...
@@ -93,7 +110,6 @@ $test->addTestCase(new Doctrine_Export_Pgsql_TestCase());
$test->addTestCase(new Doctrine_Export_Oracle_TestCase());
$test->addTestCase(new Doctrine_DataDict_Pgsql_TestCase());
$test->addTestCase(new Doctrine_Transaction_TestCase());
...
...
@@ -108,7 +124,7 @@ $test->addTestCase(new Doctrine_Transaction_Firebird_TestCase());
$test->addTestCase(new Doctrine_Transaction_Sqlite_TestCase());
$test->addTestCase(new Doctrine_Transaction_Mssql_TestCase());
*/
/**
$test->addTestCase(new Doctrine_Relation_ManyToMany_TestCase());
$test->addTestCase(new Doctrine_UnitOfWork_TestCase());
...
...
@@ -199,7 +215,7 @@ $test->addTestCase(new Doctrine_Query_Where_TestCase());
$test->addTestCase(new Doctrine_Query_Limit_TestCase());
$test->addTestCase(new Doctrine_Query_Select_TestCase());
*/
//$test->addTestCase(new Doctrine_Cache_Query_SqliteTestCase());
...
...
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