Commit 5006400c authored by zYne's avatar zYne

--no commit message

--no commit message
parent 62f72a70
......@@ -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',
'ForeignKeyTest.parent_id',
array('onDelete' => 'CASCADE',
'onUpdate' => 'RESTRICT')
);
$this->hasMany('ForeignKeyTest as Children',
'ForeignKeyTest.parent_id');
$this->option('type', 'INNODB');
}
......
......@@ -77,9 +77,10 @@ class Doctrine_Export_Pgsql_TestCase extends Doctrine_UnitTestCase
$this->assertEqual($this->adapter->pop(), 'CREATE TABLE mytable (name CHAR(10), type INT, PRIMARY KEY(name, type))');
}
public function testExportSql()
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))',
......
......@@ -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'));
}
}
......
......@@ -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());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment