Completed
Pull Request — master (#21)
by Lars
14:31
created
tests/unit/Procurement/ProcurementTest.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -147,8 +147,8 @@  discard block
 block discarded – undo
147 147
         $expected = array(
148 148
             0 => array(
149 149
                 'id' => 1,
150
-                'date_dk' => '05-01-' . date('Y'),
151
-                'date' => date('Y') . '-01-05',
150
+                'date_dk' => '05-01-'.date('Y'),
151
+                'date' => date('Y').'-01-05',
152 152
                 'text' => 'procurement# 1: test - købsmoms',
153 153
                 'debet' => '25.00',
154 154
                 'credit' => '0.00',
@@ -162,8 +162,8 @@  discard block
 block discarded – undo
162 162
             ),
163 163
             1 => array(
164 164
                 'id' => 2,
165
-                'date_dk' => '05-01-' . date('Y'),
166
-                'date' => date('Y') . '-01-05',
165
+                'date_dk' => '05-01-'.date('Y'),
166
+                'date' => date('Y').'-01-05',
167 167
                 'text' => 'procurement# 1: test',
168 168
                 'debet' => '100.00',
169 169
                 'credit' => '0.00',
@@ -177,8 +177,8 @@  discard block
 block discarded – undo
177 177
             ),
178 178
             2 => array(
179 179
                 'id' => 3,
180
-                'date_dk' => '05-01-' . date('Y'),
181
-                'date' => date('Y') . '-01-05',
180
+                'date_dk' => '05-01-'.date('Y'),
181
+                'date' => date('Y').'-01-05',
182 182
                 'text' => 'procurement# 1: test',
183 183
                 'debet' => '0.00',
184 184
                 'credit' => '125.00',
@@ -192,8 +192,8 @@  discard block
 block discarded – undo
192 192
             ),
193 193
             3 => array(
194 194
                 'id' => 4,
195
-                'date_dk' => '05-01-' . date('Y'),
196
-                'date' => date('Y') . '-01-05',
195
+                'date_dk' => '05-01-'.date('Y'),
196
+                'date' => date('Y').'-01-05',
197 197
                 'text' => 'procurement# 1: test - shipment_etc',
198 198
                 'debet' => '40.00',
199 199
                 'credit' => '0.00',
@@ -207,8 +207,8 @@  discard block
 block discarded – undo
207 207
             ),
208 208
             4 => array(
209 209
                 'id' => 5,
210
-                'date_dk' => '05-01-' . date('Y'),
211
-                'date' => date('Y') . '-01-05',
210
+                'date_dk' => '05-01-'.date('Y'),
211
+                'date' => date('Y').'-01-05',
212 212
                 'text' => 'procurement# 1: test - shipment_etc',
213 213
                 'debet' => '0.00',
214 214
                 'credit' => '40.00',
Please login to merge, or discard this patch.
tests/unit/Auth/PrivateKeyLoginTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,11 +8,11 @@
 block discarded – undo
8 8
 
9 9
     function setUp()
10 10
     {
11
-        $private_key = md5('private' . date('d-m-Y H:i:s') . 'test');
11
+        $private_key = md5('private'.date('d-m-Y H:i:s').'test');
12 12
 
13 13
         $this->db = MDB2::singleton(DB_DSN);
14 14
         $this->db->exec('TRUNCATE intranet');
15
-        $this->db->exec('INSERT INTO intranet SET private_key = ' . $this->db->quote($private_key, 'text'));
15
+        $this->db->exec('INSERT INTO intranet SET private_key = '.$this->db->quote($private_key, 'text'));
16 16
 
17 17
         $this->adapter = new Intraface_Auth_PrivateKeyLogin($this->db, self::SESSION_LOGIN, $private_key);
18 18
     }
Please login to merge, or discard this patch.
tests/unit/Auth/UserLoginTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
     {
9 9
         $db = MDB2::singleton(DB_DSN);
10 10
         $db->exec('TRUNCATE user');
11
-        $db->exec('INSERT INTO user SET email = ' . $db->quote('[email protected]', 'text') . ', password = ' . $db->quote(md5('startup'), 'text'));
11
+        $db->exec('INSERT INTO user SET email = '.$db->quote('[email protected]', 'text').', password = '.$db->quote(md5('startup'), 'text'));
12 12
 
13 13
         $this->adapter = new Intraface_Auth_User($db, self::SESSION_LOGIN, '[email protected]', 'startup');
14 14
     }
Please login to merge, or discard this patch.
tests/unit/Auth/PublicKeyLoginTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,10 +8,10 @@
 block discarded – undo
8 8
 
9 9
     function setUp()
10 10
     {
11
-        $public_key = md5('public' . date('d-m-Y H:i:s') . 'test');
11
+        $public_key = md5('public'.date('d-m-Y H:i:s').'test');
12 12
         $this->db = MDB2::singleton(DB_DSN);
13 13
         $this->db->exec('TRUNCATE intranet');
14
-        $this->db->exec('INSERT INTO intranet SET public_key = ' . $this->db->quote($public_key, 'text'));
14
+        $this->db->exec('INSERT INTO intranet SET public_key = '.$this->db->quote($public_key, 'text'));
15 15
         $this->adapter = new Intraface_Auth_PublicKeyLogin($this->db, self::SESSION_LOGIN, $public_key);
16 16
     }
17 17
 
Please login to merge, or discard this patch.
tests/unit/Keyword/KeywordStringAppendTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 require_once 'Intraface/shared/keyword/Keyword.php';
3
-require_once dirname(__FILE__) . '/../Stub/Keyword.php';
3
+require_once dirname(__FILE__).'/../Stub/Keyword.php';
4 4
 
5 5
 class KeywordStringAppendTest extends PHPUnit_Framework_TestCase
6 6
 {
Please login to merge, or discard this patch.
tests/unit/Product/ProductTest.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -88,14 +88,14 @@  discard block
 block discarded – undo
88 88
         $product = new Product($this->kernel, $result);
89 89
         $name = 'Test';
90 90
         $price = 20;
91
-        if (!$result = $product->save(array('number' => $values['number'], 'name' => $name . '2', 'price' => $price, 'unit' => 1))) {
91
+        if (!$result = $product->save(array('number' => $values['number'], 'name' => $name.'2', 'price' => $price, 'unit' => 1))) {
92 92
             $product->error->view();
93 93
         }
94 94
         $this->assertTrue($result > 0);
95 95
         $values = $product->get();
96 96
 
97 97
         $this->assertEquals(1, $values['number']);
98
-        $this->assertEquals($name . '2', $values['name']);
98
+        $this->assertEquals($name.'2', $values['name']);
99 99
         $this->assertEquals($price, $values['price']);
100 100
     }
101 101
 
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
         try {
283 283
             $product->setAttributeGroup(1);
284 284
             $this->assertTrue(false, 'An excpetion is not thrown');
285
-        } catch(Exception $e) {
285
+        } catch (Exception $e) {
286 286
             $this->assertEquals('You can not set attribute group for a product without variations!', $e->getMessage());
287 287
         }
288 288
     }
@@ -410,11 +410,11 @@  discard block
 block discarded – undo
410 410
 
411 411
     function testGetPriceInCurrency()
412 412
     {
413
-        require_once dirname(__FILE__) .'/../Stub/Fake/Intraface/modules/currency/Currency.php';
413
+        require_once dirname(__FILE__).'/../Stub/Fake/Intraface/modules/currency/Currency.php';
414 414
         $currency = new Fake_Intraface_modules_currency_Currency;
415
-        require_once dirname(__FILE__) .'/../Stub/Fake/Intraface/modules/currency/Currency/ExchangeRate.php';
415
+        require_once dirname(__FILE__).'/../Stub/Fake/Intraface/modules/currency/Currency/ExchangeRate.php';
416 416
         $currency->product_price_exchange_rate = new Fake_Intraface_modules_currency_Currency_ExchangeRate;
417
-        require_once dirname(__FILE__) .'/../Stub/Fake/Ilib/Variable/Float.php';
417
+        require_once dirname(__FILE__).'/../Stub/Fake/Ilib/Variable/Float.php';
418 418
         $currency->product_price_exchange_rate->rate = new Fake_Ilib_Variable_Float(745.23);
419 419
 
420 420
         $product = new Product($this->kernel);
Please login to merge, or discard this patch.
tests/unit/Product/ProductDoctrineTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
                 INTRAFACE_INTRANETMAINTENANCE_SHOP_ID,
62 62
                 INTRAFACE_XMLRPC_DEBUG,
63 63
                 $xmlrpc_shop_url);
64
-        } catch(Exception $e) {
64
+        } catch (Exception $e) {
65 65
             $this->shop = NULL;
66 66
             throw new Exception('Unable to connect to the intranet maintenance webshop '.$e->getMessage());
67 67
         }
Please login to merge, or discard this patch.
tests/unit/setup_database.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -8,11 +8,11 @@
 block discarded – undo
8 8
 }
9 9
 
10 10
 define('SERVER_STATUS', 'DEVELOPEMENT');
11
-define('DB_DSN', 'mysql://root:' . $pass . '@localhost/intraface_test');
11
+define('DB_DSN', 'mysql://root:'.$pass.'@localhost/intraface_test');
12 12
 define('DB_NAME', 'intraface_test');
13 13
 
14
-require_once dirname(__FILE__) . '/../../vendor/autoload.php';
15
-$install_class = dirname(__FILE__). '/../../install/Install.php';
14
+require_once dirname(__FILE__).'/../../vendor/autoload.php';
15
+$install_class = dirname(__FILE__).'/../../install/Install.php';
16 16
 if (!file_exists($install_class)) {
17 17
     throw new Exception('The install class is not present. Probably because you should not run it now!');
18 18
     exit;
Please login to merge, or discard this patch.
tests/unit/Common/RedirectTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 
61 61
     function tearDown()
62 62
     {
63
-        $result = $this->db->exec('TRUNCATE ' . $this->table);
63
+        $result = $this->db->exec('TRUNCATE '.$this->table);
64 64
     }
65 65
 
66 66
     function testConstruction()
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
         $destination_url = 'http://example.dk/page.php';
78 78
         $url = $redirect->setDestination($destination_url, $return_url);
79 79
         $parameter_to_return_with = 'add_contact_id'; // activates the parameter sent back to the return page
80
-        $this->assertEquals($destination_url . '?redirect_id=1', $url);
80
+        $this->assertEquals($destination_url.'?redirect_id=1', $url);
81 81
     }
82 82
 /*
83 83
     function testRecieveRedirectAndGetRedirect()
Please login to merge, or discard this patch.