2006-04-14 00:37:28 +04:00
|
|
|
<?php
|
|
|
|
require_once("UnitTestCase.class.php");
|
|
|
|
class Doctrine_BatchIteratorTestCase extends Doctrine_UnitTestCase {
|
|
|
|
public function testIterator() {
|
|
|
|
$graph = new Doctrine_DQL_Parser($this->session);
|
|
|
|
$entities = $graph->query("FROM Entity");
|
|
|
|
$i = 0;
|
|
|
|
foreach($entities as $entity) {
|
2006-04-14 14:20:19 +04:00
|
|
|
$this->assertEqual(gettype($entity->name),"string");
|
2006-04-14 00:37:28 +04:00
|
|
|
$i++;
|
|
|
|
}
|
|
|
|
$this->assertTrue($i == $entities->count());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
?>
|