Fixed coding standard
This commit is contained in:
parent
5f0198a407
commit
9988907e35
@ -48,7 +48,7 @@ class Doctrine_Query_MultipleAggregateValue_TestCase extends Doctrine_UnitTestCa
|
|||||||
|
|
||||||
public function testMultipleAggregateValues()
|
public function testMultipleAggregateValues()
|
||||||
{
|
{
|
||||||
$query = new Doctrine_Query();
|
$query = new Doctrine_Query();
|
||||||
$query->select('u.*, COUNT(DISTINCT b.id) num_books, COUNT(DISTINCT a.id) num_albums');
|
$query->select('u.*, COUNT(DISTINCT b.id) num_books, COUNT(DISTINCT a.id) num_albums');
|
||||||
$query->from('User u');
|
$query->from('User u');
|
||||||
$query->leftJoin('u.Album a, u.Book b');
|
$query->leftJoin('u.Album a, u.Book b');
|
||||||
@ -61,7 +61,7 @@ class Doctrine_Query_MultipleAggregateValue_TestCase extends Doctrine_UnitTestCa
|
|||||||
$name = $user->name;
|
$name = $user->name;
|
||||||
$num_albums = $user->Album[0]->num_albums;
|
$num_albums = $user->Album[0]->num_albums;
|
||||||
$num_books = $user->Book[0]->num_books;
|
$num_books = $user->Book[0]->num_books;
|
||||||
} catch(Doctrine_Exception $e) {
|
} catch (Doctrine_Exception $e) {
|
||||||
$this->fail();
|
$this->fail();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -85,25 +85,25 @@ class Doctrine_Query_Subquery_TestCase extends Doctrine_UnitTestCase
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testGetLimitSubqueryOrderBy()
|
public function testGetLimitSubqueryOrderBy()
|
||||||
{
|
{
|
||||||
$query = new Doctrine_Query();
|
$query = new Doctrine_Query();
|
||||||
$query->select('u.*, COUNT(DISTINCT a.id) num_albums');
|
$query->select('u.*, COUNT(DISTINCT a.id) num_albums');
|
||||||
$query->from('User u, u.Album a');
|
$query->from('User u, u.Album a');
|
||||||
$query->orderby('num_albums');
|
$query->orderby('num_albums');
|
||||||
|
|
||||||
|
try{
|
||||||
|
// this causes getLimitSubquery() to be used, and it fails
|
||||||
|
$query->limit(5);
|
||||||
|
|
||||||
try{
|
$users = $query->execute();
|
||||||
// this causes getLimitSubquery() to be used, and it fails
|
|
||||||
$query->limit(5);
|
|
||||||
|
|
||||||
$users = $query->execute();
|
|
||||||
|
|
||||||
$count = $users->count();
|
|
||||||
} catch(Doctrine_Exception $e) {
|
|
||||||
$this->fail();
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->assertEqual($count, 1);
|
$count = $users->count();
|
||||||
|
} catch (Doctrine_Exception $e) {
|
||||||
|
$this->fail();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$this->assertEqual($count, 1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user