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
1e568086
Commit
1e568086
authored
Jul 23, 2007
by
zYne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
--no commit message
--no commit message
parent
ad44c656
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
133 deletions
+0
-133
ImportTestCase.php
tests/ImportTestCase.php
+0
-133
No files found.
tests/ImportTestCase.php
View file @
1e568086
...
@@ -89,137 +89,4 @@ class Doctrine_Import_TestCase extends Doctrine_UnitTestCase {
...
@@ -89,137 +89,4 @@ class Doctrine_Import_TestCase extends Doctrine_UnitTestCase {
unlink
(
'tmp'
.
DIRECTORY_SEPARATOR
.
'ImportTest.php'
);
unlink
(
'tmp'
.
DIRECTORY_SEPARATOR
.
'ImportTest.php'
);
}
}
public
function
testForeignKeySupport
()
{
/**
$this->dbh->query('CREATE TABLE album (
id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
title VARCHAR(100),
artist VARCHAR(100)
)');
$this->dbh->query('CREATE TABLE track (
id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
album_id INTEGER,
dsk INTEGER,
posn INTEGER,
song VARCHAR(255),
FOREIGN KEY (album_id) REFERENCES album(id)
)');
$sql = "PRAGMA table_info(track)";
$sql = "PRAGMA foreign_key_list(track)";
$result = $this->dbh->query($sql)->fetchAll(PDO::FETCH_ASSOC);
*/
}
/**
public function testDatabaseConnectionIsReverseEngineeredToSchema()
{
$this->assertTrue($this->schema instanceof Doctrine_Schema);
//table count should match
$this->assertEqual(count($this->schema), count($this->tables));
}
public function testBaseClassesAreWritten()
{
//now lets match the original with the result
foreach($this->tables as $name)
{
$name = ucwords($name);
$filename = $this->tmpdir.$name.$this->suffix.'.php';
$this->assertTrue(file_exists($filename));
}
}
public function testNativeColumnDefinitionsAreTranslatedCorrectly()
{
$transArr = array();
$transArr['sqlite'] = array(
// array(native type, native length, doctrine type, doctrine length),
array('int', 11, 'int', 11),
//array('varchar', 255, 'string', 255),
);
foreach ($transArr as $dbType => $colArr)
{
foreach($colArr as $colDef)
{
list($natType, $natLen, $expType, $expLen) = $colDef;
list($resType, $resLen) = Doctrine_DataDict::getDoctrineType($natType, $natLen, $dbType);
$this->assertEqual($resType, $expType);
$this->assertEqual($resLen, $expLen);
}
}
}
public function testDoctrineRecordBaseClassesAreBuildCorrectly()
{
foreach($this->tables as $name)
{
$name = ucwords($name);
$filename = $this->tmpdir.$name.$this->suffix.'.php';
if(file_exists($filename))
{
require_once $filename;
$obj = new $name.$this->suffix;
list($oType, $oLength,) = $this->connection->getTable($name)->getColumns();
list($rType, $rLength,) = $this->connection->getTable($name.$this->suffix)->getColumns();
$this->assertEquals($rType, $oType);
$this->assertEquals($rLength, $oLength);
}
}
}
*/
// Gets the system temporary directory name
// @return null on failure to resolve the system temp dir
private
function
getTempDir
()
{
/**
if(function_exists('sys_get_temp_dir')) {
$tempdir = sys_get_temp_dir();
} elseif (!empty($_ENV['TMP'])) {
$tempdir = $_ENV['TMP'];
} elseif (!empty($_ENV['TMPDIR'])) {
$tempdir = $_ENV['TMPDIR'];
} elseif (!empty($_ENV['TEMP'])) {
$tempdir = $_ENV['TEMP'];
} else {
//a little bit of chewing gum here will do the trick
$tempdir = dirname(tempnam('/THIS_REALLY_SHOULD_NOT_EXISTS', 'na'));
}
if (empty($tempdir)) { return null; }
$tempdir = rtrim($tempdir, '/');
$tempdir .= DIRECTORY_SEPARATOR;
if (is_writable($tempdir) == false) {
return null;
}
$dir = tempnam($tempdir, 'doctrine_tests');
@unlink($dir);
@rmdir($dir);
mkdir($dir);
$dir .= DIRECTORY_SEPARATOR;
return $dir;
*/
}
}
}
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