Commit a28c399c authored by zYne's avatar zYne

Ticket 330 closed.

parent e1fb5e53
......@@ -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);
// Unecessary query is triggered on line before due to false value column
$this->assertEqual($this->dbh->count(), $prevCount);
}
}
$this->assertEqual($this->dbh->count(), $prevCount);
$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);
}
}
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