Commit f943213f authored by meus's avatar meus

fixed errors after cleaning up tests. removed some tabs

parent e360684d
<?php
class Location extends Doctrine_Record
{
public function setTableDefinition()
{
$this->hasColumn('lat', 'double', 10, array ());
$this->hasColumn('lon', 'double', 10, array ());
}
public function setUp()
{
$this->hasMany('LocationI18n as LocationI18n', array('local' => 'id', 'foreign' => 'id'));
}
}
<?php
class MysqlIndexTestRecord extends Doctrine_Record
{
public function setTableDefinition()
{
$this->hasColumn('name', 'string', null);
$this->hasColumn('code', 'integer', 4);
$this->hasColumn('content', 'string', 4000);
$this->index('content', array('fields' => 'content', 'type' => 'fulltext'));
$this->index('namecode', array('fields' => array('name', 'code'),
'type' => 'unique'));
$this->option('type', 'MYISAM');
}
}
<?php
class mmrUser_C extends Doctrine_Record
{
public function setUp()
{
$this->hasMany('mmrGroup_C as Group', array('local' => 'user_id',
'foreign' => 'group_id',
'refClass' => 'mmrGroupUser_C'));
}
public function setTableDefinition()
{
// Works when
$this->hasColumn('u_id as id', 'string', 30, array('primary' => true));
$this->hasColumn('name', 'string', 30);
}
}
......@@ -79,7 +79,8 @@ class Doctrine_Export_Pgsql_TestCase extends Doctrine_UnitTestCase
}
public function testExportSql()
{
$sql = $this->export->exportSql(dirname(__FILE__) . DIRECTORY_SEPARATOR . '_files');
$sql = $this->export->exportClassesSql(array("FooRecord", "FooReferenceRecord", "FooLocallyOwned", "FooForeignlyOwned", "FooBarRecord", "BarRecord"));
//dirname(__FILE__) . DIRECTORY_SEPARATOR . '_files');
$this->assertEqual($sql, array ( 0 => 'CREATE TABLE foo_reference (foo1 BIGINT, foo2 BIGINT, PRIMARY KEY(foo1, foo2))',
1 => 'CREATE TABLE foo_locally_owned (id BIGSERIAL, name VARCHAR(200), PRIMARY KEY(id))',
......
......@@ -20,7 +20,6 @@ class GroupTest extends UnitTestCase
$reporter->paintHeader();
foreach ($this->_testCases as $k => $testCase) {
$testCase->run();
$this->_passed += $testCase->getPassCount();
$this->_failed += $testCase->getFailCount();
$this->_messages = array_merge($this->_messages, $testCase->getMessages());
......
......@@ -408,8 +408,8 @@ class MyReporter extends HtmlReporter {
print "\">";
print $this->_test->getTestCaseCount() . ' test cases';
print " test cases complete:\n";
print "<strong>" . $this->_test->getPassCount() . "</strong> passes, ";
print "<strong>" . $this->_test->getFailCount() . "</strong> fails and ";
print "<strong>" . $this->_test->getPassCount() . "</strong> passes and ";
print "<strong>" . $this->_test->getFailCount() . "</strong> fails.";
print "</div>\n";
}
}
......@@ -434,4 +434,3 @@ if (isset($argv[1]) && $argv[1] == "coverage") {
} else {
$test->run($reporter);
}
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