From 1f73ffeb551a17563ae238ee90de380a9384b880 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 21 Feb 2017 11:44:42 +0200 Subject: [ci skip] Reduce excessive indentation in QB group_by(), having() tests --- .../database/query_builder/group_test.php | 65 +++++++++++----------- 1 file changed, 32 insertions(+), 33 deletions(-) (limited to 'tests/codeigniter') 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 +} -- cgit v1.2.3-24-g4f1b