@@ -147,8 +147,8 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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', |
@@ -8,11 +8,11 @@ |
||
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 | } |
@@ -8,7 +8,7 @@ |
||
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 | } |
@@ -8,10 +8,10 @@ |
||
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 |
@@ -1,6 +1,6 @@ |
||
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 | { |
@@ -88,14 +88,14 @@ discard block |
||
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 |
||
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 |
||
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); |
@@ -61,7 +61,7 @@ |
||
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 | } |
@@ -8,11 +8,11 @@ |
||
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; |
@@ -60,7 +60,7 @@ discard block |
||
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 |
||
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() |