1
0
mirror of synced 2025-01-18 06:21:40 +03:00

Ticket 330 closed.

This commit is contained in:
zYne 2007-06-13 20:59:05 +00:00
parent e1fb5e5345
commit a28c399c1c

View File

@ -70,34 +70,26 @@ class Doctrine_Ticket330_TestCase extends Doctrine_UnitTestCase
$node2->save();
$nodes = Doctrine_Query::create()
->select('n.title, d.null_column, d.is_bool')
->select('n.title, d.*')
->from('stNode n, n.detail d')
->orderby('n.id')
->execute();
$prevCount = $this->dbh->count();
foreach ( $nodes as $node )
{
if ( $node->get('title') == 'first node')
{
$this->assertEqual($node->detail->get('is_bool'), true);
$this->assertEqual($node->detail->get('null_column'), null);
$this->assertEqual($nodes[0]->detail->get('is_bool'), true);
$this->assertEqual($nodes[0]->detail->get('null_column'), null);
// Unnecessary query is triggered on line before due to null value column.
$this->assertEqual($this->dbh->count(), $prevCount);
$prevCount = $this->dbh->count();
}
else
{
$this->assertEqual($node->detail->get('null_column'), 'value');
$this->assertEqual($node->detail->get('is_bool'), false);
$this->assertEqual($nodes[1]->detail->get('null_column'), 'value');
$this->assertEqual($nodes[1]->detail->get('is_bool'), false);
// Unecessary query is triggered on line before due to false value column
$this->assertEqual($this->dbh->count(), $prevCount);
}
}
$this->assertEqual($this->dbh->count(), $prevCount);
}
}