diff options
author | Andrey Andreev <narf@devilix.net> | 2017-02-21 10:44:42 +0100 |
---|---|---|
committer | Andrey Andreev <narf@devilix.net> | 2017-02-21 10:44:42 +0100 |
commit | 1f73ffeb551a17563ae238ee90de380a9384b880 (patch) | |
tree | 7855c03937a5e8861739bb44444d4993c21d0dfe /tests/codeigniter/database/query_builder | |
parent | cf6a44c7266ec813e56a9bb002179f8c599e5a92 (diff) |
[ci skip] Reduce excessive indentation in QB group_by(), having() tests
Diffstat (limited to 'tests/codeigniter/database/query_builder')
-rw-r--r-- | tests/codeigniter/database/query_builder/group_test.php | 65 |
1 files changed, 32 insertions, 33 deletions
diff --git a/tests/codeigniter/database/query_builder/group_test.php b/tests/codeigniter/database/query_builder/group_test.php index 51266e858..cf91c0965 100644 --- a/tests/codeigniter/database/query_builder/group_test.php +++ b/tests/codeigniter/database/query_builder/group_test.php @@ -23,10 +23,10 @@ class Group_test extends CI_TestCase { public function test_group_by() { $jobs = $this->db->select('name') - ->from('job') - ->group_by('name') - ->get() - ->result_array(); + ->from('job') + ->group_by('name') + ->get() + ->result_array(); $this->assertEquals(4, count($jobs)); } @@ -39,11 +39,11 @@ class Group_test extends CI_TestCase { public function test_having_by() { $jobs = $this->db->select('name') - ->from('job') - ->group_by('name') - ->having('SUM(id) > 2') - ->get() - ->result_array(); + ->from('job') + ->group_by('name') + ->having('SUM(id) > 2') + ->get() + ->result_array(); $this->assertEquals(2, count($jobs)); } @@ -56,11 +56,11 @@ class Group_test extends CI_TestCase { public function test_having_in() { $jobs = $this->db->select('name') - ->from('job') - ->group_by('name') - ->having_in('SUM(id)', array(1, 2, 5)) - ->get() - ->result_array(); + ->from('job') + ->group_by('name') + ->having_in('SUM(id)', array(1, 2, 5)) + ->get() + ->result_array(); $this->assertEquals(2, count($jobs)); } @@ -73,12 +73,12 @@ class Group_test extends CI_TestCase { public function test_or_having_in() { $jobs = $this->db->select('name') - ->from('job') - ->group_by('name') - ->or_having_in('SUM(id)', array(1, 5)) - ->or_having_in('SUM(id)', array(2, 6)) - ->get() - ->result_array(); + ->from('job') + ->group_by('name') + ->or_having_in('SUM(id)', array(1, 5)) + ->or_having_in('SUM(id)', array(2, 6)) + ->get() + ->result_array(); $this->assertEquals(2, count($jobs)); } @@ -91,11 +91,11 @@ class Group_test extends CI_TestCase { public function test_having_not_in() { $jobs = $this->db->select('name') - ->from('job') - ->group_by('name') - ->having_not_in('SUM(id)', array(3, 6)) - ->get() - ->result_array(); + ->from('job') + ->group_by('name') + ->having_not_in('SUM(id)', array(3, 6)) + ->get() + ->result_array(); $this->assertEquals(3, count($jobs)); } @@ -108,14 +108,13 @@ class Group_test extends CI_TestCase { public function test_or_having_not_in() { $jobs = $this->db->select('name') - ->from('job') - ->group_by('name') - ->or_having_not_in('SUM(id)', array(1, 2, 3)) - ->or_having_not_in('SUM(id)', array(1, 3, 4)) - ->get() - ->result_array(); + ->from('job') + ->group_by('name') + ->or_having_not_in('SUM(id)', array(1, 2, 3)) + ->or_having_not_in('SUM(id)', array(1, 3, 4)) + ->get() + ->result_array(); $this->assertEquals(2, count($jobs)); } - -}
\ No newline at end of file +} |