Completed
Pull Request — master (#26)
by Lars
10:03
created
tests/unit/Keyword/KeywordAppendTest.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 KeywordAppendTest extends PHPUnit_Framework_TestCase
6 6
 {
Please login to merge, or discard this patch.
tests/unit/Keyword/KeywordTest.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 KeywordTest extends PHPUnit_Framework_TestCase
6 6
 {
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/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/KernelTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -160,7 +160,7 @@
 block discarded – undo
160 160
         $db = MDB2::singleton(DB_DSN);
161 161
         $result = $db->query('SELECT * FROM module');
162 162
         if (PEAR::isError($result)) {
163
-            die($result->getMessage() . $result->getUserInfo());
163
+            die($result->getMessage().$result->getUserInfo());
164 164
         }
165 165
 
166 166
         $kernel = new Intraface_Kernel;
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.
tests/unit/Common/ModuleHandlerTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
         $db = MDB2::singleton(DB_DSN);
56 56
         $result = $db->query('SELECT * FROM module');
57 57
         if (PEAR::isError($result)) {
58
-            die($result->getMessage() . $result->getUserInfo());
58
+            die($result->getMessage().$result->getUserInfo());
59 59
         }
60 60
 
61 61
         $this->assertTrue(is_array($this->handler->getModules(MDB2::singleton(DB_DSN))));
Please login to merge, or discard this patch.
tests/unit/Common/DateTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
     {
17 17
         $date = new Intraface_Date('10-10');
18 18
         $this->assertTrue($date->convert2db());
19
-        $this->assertEquals(date('Y') . '-10-10', $date->get());
19
+        $this->assertEquals(date('Y').'-10-10', $date->get());
20 20
     }
21 21
 
22 22
     function testDateCanTakeSpacesAsSplittersDatabaseFormat()
Please login to merge, or discard this patch.