diff options
author | Simon Holywell <[email protected]> | 2013-08-28 04:16:38 -0700 |
---|---|---|
committer | Simon Holywell <[email protected]> | 2013-08-28 04:16:38 -0700 |
commit | b1d868a6ad05c46e9444f4a06707c05b6bc2bf4d (patch) | |
tree | e50332a1042cd37517d8b72483cb44a531bfc4a4 /test | |
parent | 2a3758e41f3a22b9f78c3397aa861b8e2e33f29f (diff) | |
parent | d1a02c523a468a021b20d417be8bb1bd38755248 (diff) |
Merge pull request #120 from tassoevan/develop
Ignore result columns when calling a aggregate function
Diffstat (limited to 'test')
-rw-r--r-- | test/QueryBuilderTest.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/QueryBuilderTest.php b/test/QueryBuilderTest.php index bd888c0..6888c85 100644 --- a/test/QueryBuilderTest.php +++ b/test/QueryBuilderTest.php @@ -477,6 +477,12 @@ class QueryBuilderTest extends PHPUnit_Framework_TestCase { $expected = "SELECT COUNT(*) AS `count` FROM `widget` LIMIT 1"; $this->assertEquals($expected, ORM::get_last_query()); } + + public function testIgnoreSelectAndCount() { + ORM::for_table('widget')->select('test')->count(); + $expected = "SELECT COUNT(*) AS `count` FROM `widget` LIMIT 1"; + $this->assertEquals($expected, ORM::get_last_query()); + } public function testMax() { ORM::for_table('person')->max('height'); |