Completed
Pull Request — master (#26)
by Lars
10:03
created
tests/unit/Debtor/CreditNoteTest.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -130,15 +130,15 @@  discard block
 block discarded – undo
130 130
         $creditnote = $this->createAnCreditNoteWithOneItem();
131 131
         $creditnote->setStatus('sent');
132 132
         $year = $this->createAccountingYear();
133
-        $this->assertTrue($creditnote->state($year, 1, '10-01-' . date('Y'), new Stub_Translation), 'state: '.$creditnote->error->view());
133
+        $this->assertTrue($creditnote->state($year, 1, '10-01-'.date('Y'), new Stub_Translation), 'state: '.$creditnote->error->view());
134 134
 
135 135
         $voucher = Voucher::factory($year, 1);
136 136
 
137 137
         $expected = array(
138 138
             0 => array(
139 139
                 'id' => 1,
140
-                'date_dk' => '10-01-' . date('Y'),
141
-                'date' => date('Y') . '-01-10',
140
+                'date_dk' => '10-01-'.date('Y'),
141
+                'date' => date('Y').'-01-10',
142 142
                 'text' => 'credit note #1 - test',
143 143
                 'debet' => 200,
144 144
                 'credit' => 0,
@@ -152,8 +152,8 @@  discard block
 block discarded – undo
152 152
             ),
153 153
             1 => array(
154 154
                 'id' => 2,
155
-                'date_dk' => '10-01-' . date('Y'),
156
-                'date' => date('Y'). '-01-10',
155
+                'date_dk' => '10-01-'.date('Y'),
156
+                'date' => date('Y').'-01-10',
157 157
                 'text' => 'credit note #1 - test',
158 158
                 'debet' => 0,
159 159
                 'credit' => 200,
@@ -167,8 +167,8 @@  discard block
 block discarded – undo
167 167
             ),
168 168
             2 => array(
169 169
                 'id' => 3,
170
-                'date_dk' => '10-01-' . date('Y'),
171
-                'date' => date('Y') . '-01-10',
170
+                'date_dk' => '10-01-'.date('Y'),
171
+                'date' => date('Y').'-01-10',
172 172
                 'text' => 'credit note #1 - Moms, udgående, salg',
173 173
                 'debet' => 50.00,
174 174
                 'credit' => 0.00,
@@ -182,8 +182,8 @@  discard block
 block discarded – undo
182 182
             ),
183 183
             3 => array(
184 184
                 'id' => 4,
185
-                'date_dk' => '10-01-' . date('Y'),
186
-                'date' => date('Y'). '-01-10',
185
+                'date_dk' => '10-01-'.date('Y'),
186
+                'date' => date('Y').'-01-10',
187 187
                 'text' => 'credit note #1 - Moms, udgående, salg',
188 188
                 'debet' => 0,
189 189
                 'credit' => 50,
@@ -207,15 +207,15 @@  discard block
 block discarded – undo
207 207
         $creditnote = $this->createAnCreditNoteWithOneItem(array('product_vat' => 0, 'product_state_account_id' => 1120));
208 208
         $creditnote->setStatus('sent');
209 209
         $year = $this->createAccountingYear();
210
-        $this->assertTrue($creditnote->state($year, 1, '10-01-' . date('Y'), new Stub_Translation), 'state: '.$creditnote->error->view());
210
+        $this->assertTrue($creditnote->state($year, 1, '10-01-'.date('Y'), new Stub_Translation), 'state: '.$creditnote->error->view());
211 211
 
212 212
         $voucher = Voucher::factory($year, 1);
213 213
 
214 214
         $expected = array(
215 215
             0 => array(
216 216
                 'id' => 1,
217
-                'date_dk' => '10-01-' . date('Y'),
218
-                'date' => date('Y') . '-01-10',
217
+                'date_dk' => '10-01-'.date('Y'),
218
+                'date' => date('Y').'-01-10',
219 219
                 'text' => 'credit note #1 - test',
220 220
                 'debet' => 200,
221 221
                 'credit' => 0,
@@ -229,8 +229,8 @@  discard block
 block discarded – undo
229 229
             ),
230 230
             1 => array(
231 231
                 'id' => 2,
232
-                'date_dk' => '10-01-' . date('Y'),
233
-                'date' => date('Y'). '-01-10',
232
+                'date_dk' => '10-01-'.date('Y'),
233
+                'date' => date('Y').'-01-10',
234 234
                 'text' => 'credit note #1 - test',
235 235
                 'debet' => 0,
236 236
                 'credit' => 200,
Please login to merge, or discard this patch.
tests/unit/Debtor/DebtorPdfTest.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -1,16 +1,16 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 require_once 'Intraface/modules/debtor/Visitor/Pdf.php';
3
-require_once dirname(__FILE__) .'/stubs/Debtor.php';
4
-require_once dirname(__FILE__) .'/stubs/DebtorLongProductText.php';
5
-require_once dirname(__FILE__) .'/../Contact/stubs/Contact.php';
6
-require_once dirname(__FILE__) .'/../Contact/stubs/ContactPerson.php';
7
-require_once dirname(__FILE__) . '/../Stub/Fake/Ilib/Variable/Float.php';
3
+require_once dirname(__FILE__).'/stubs/Debtor.php';
4
+require_once dirname(__FILE__).'/stubs/DebtorLongProductText.php';
5
+require_once dirname(__FILE__).'/../Contact/stubs/Contact.php';
6
+require_once dirname(__FILE__).'/../Contact/stubs/ContactPerson.php';
7
+require_once dirname(__FILE__).'/../Stub/Fake/Ilib/Variable/Float.php';
8 8
 
9 9
 class DebtorPdfTest extends PHPUnit_Framework_TestCase
10 10
 {
11 11
     function setup()
12 12
     {
13
-        $this->debtor_pdf_path = TEST_PATH_TEMP . '/debtor.pdf';
13
+        $this->debtor_pdf_path = TEST_PATH_TEMP.'/debtor.pdf';
14 14
         $this->tearDown();
15 15
     }
16 16
 
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
         $debtor = $this->createDebtor();
60 60
         $pdf->visit($debtor);
61 61
         $pdf->output('file', $this->debtor_pdf_path);
62
-        $expected = file_get_contents(dirname(__FILE__) .'/expected_debtor.pdf', 1);
62
+        $expected = file_get_contents(dirname(__FILE__).'/expected_debtor.pdf', 1);
63 63
         $actual = file_get_contents($this->debtor_pdf_path);
64 64
         $this->assertEquals(strlen($expected), strlen($actual));
65 65
     }
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
         $debtor->values['payment_total'] = 2125;
75 75
         $pdf->visit($debtor);
76 76
         $pdf->output('file', $this->debtor_pdf_path);
77
-        $expected = file_get_contents(dirname(__FILE__) .'/expected_debtor_with_payment.pdf', 1);
77
+        $expected = file_get_contents(dirname(__FILE__).'/expected_debtor_with_payment.pdf', 1);
78 78
         $actual = file_get_contents($this->debtor_pdf_path);
79 79
         $this->assertEquals(strlen($expected), strlen($actual));
80 80
     }
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
         $debtor = $this->createDebtorLongProductText();
89 89
         $pdf->visit($debtor);
90 90
         $pdf->output('file', $this->debtor_pdf_path);
91
-        $expected = file_get_contents(dirname(__FILE__) .'/expected_debtor_with_long_text.pdf', 1);
91
+        $expected = file_get_contents(dirname(__FILE__).'/expected_debtor_with_long_text.pdf', 1);
92 92
         $actual = file_get_contents($this->debtor_pdf_path);
93 93
         $this->assertEquals(strlen($expected), strlen($actual));
94 94
     }
Please login to merge, or discard this patch.
tests/unit/Debtor/ReminderTest.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -218,15 +218,15 @@  discard block
 block discarded – undo
218 218
                 'checked_invoice' => array($this->createAnInvoice($contact_id))));
219 219
         $reminder->setStatus('sent');
220 220
         $year = $this->createAccountingYear();
221
-        $this->assertTrue($reminder->state($year, 1, '10-01-' . date('Y'), 1120, new Stub_Translation), $reminder->error->view());
221
+        $this->assertTrue($reminder->state($year, 1, '10-01-'.date('Y'), 1120, new Stub_Translation), $reminder->error->view());
222 222
 
223 223
         $voucher = Voucher::factory($year, 1);
224 224
 
225 225
         $expected = array(
226 226
             0 => array(
227 227
                 'id' => 1,
228
-                'date_dk' => '10-01-' . date('Y'),
229
-                'date' => date('Y') . '-01-10',
228
+                'date_dk' => '10-01-'.date('Y'),
229
+                'date' => date('Y').'-01-10',
230 230
                 'text' => 'reminder #1',
231 231
                 'debet' => 100.00,
232 232
                 'credit' => 0.00,
@@ -240,8 +240,8 @@  discard block
 block discarded – undo
240 240
             ),
241 241
             1 => array(
242 242
                 'id' => 2,
243
-                'date_dk' => '10-01-' . date('Y'),
244
-                'date' => date('Y') . '-01-10',
243
+                'date_dk' => '10-01-'.date('Y'),
244
+                'date' => date('Y').'-01-10',
245 245
                 'text' => 'reminder #1',
246 246
                 'debet' => 0.00,
247 247
                 'credit' => 100.00,
Please login to merge, or discard this patch.
tests/unit/Debtor/DebtorItemTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
1 1
 <?php
2 2
 require_once 'Intraface/modules/debtor/DebtorItem.php';
3 3
 require_once 'Intraface/functions.php';
4
-require_once dirname(__FILE__) .'/stubs/Debtor.php';
4
+require_once dirname(__FILE__).'/stubs/Debtor.php';
5 5
 
6 6
 class DebtorItemTest extends PHPUnit_Framework_TestCase
7 7
 {
Please login to merge, or discard this patch.
tests/unit/Stub/Intranet.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
 
11 11
     function get($key = '')
12 12
     {
13
-        $info = array('name' => 'Intranetname', 'contact_person' => '','id' => 1, 'public_key' => 'somepublickey', 'identifier' => 'intraface');
13
+        $info = array('name' => 'Intranetname', 'contact_person' => '', 'id' => 1, 'public_key' => 'somepublickey', 'identifier' => 'intraface');
14 14
         if (empty($key)) {
15 15
             return $info;
16 16
         } else {
Please login to merge, or discard this patch.
tests/unit/Filehandler/FileHandlerTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
     {
12 12
         $db = MDB2::singleton(DB_DSN);
13 13
         $db->query('TRUNCATE file_handler');
14
-        fht_deltree(PATH_UPLOAD . '1');
14
+        fht_deltree(PATH_UPLOAD.'1');
15 15
     }
16 16
 
17 17
     function createKernel()
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
     {
79 79
         $fh = new FileHandler($this->createKernel());
80 80
         // first we make a copy of the file as it is moved by upload.
81
-        copy(dirname(__FILE__) . '/wideonball.jpg', PATH_UPLOAD.'wideonball.jpg');
81
+        copy(dirname(__FILE__).'/wideonball.jpg', PATH_UPLOAD.'wideonball.jpg');
82 82
         $id = $fh->save(PATH_UPLOAD.'wideonball.jpg', 'Filename');
83 83
         $fh->error->view();
84 84
         $this->assertTrue($id > 0);
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
     {
89 89
         $fh = new FileHandler($this->createKernel());
90 90
         // first we make a copy of the file as it is moved by upload.
91
-        copy(dirname(__FILE__) . '/wideonball.jpg', PATH_UPLOAD.'wideonball.jpg');
91
+        copy(dirname(__FILE__).'/wideonball.jpg', PATH_UPLOAD.'wideonball.jpg');
92 92
         $id = $fh->save(PATH_UPLOAD.'wideonball.jpg', 'Filename');
93 93
         $fh->load();
94 94
         $this->assertEquals(50, strlen($fh->get('access_key')));
Please login to merge, or discard this patch.
tests/unit/Filehandler/TemporaryFileTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
 
11 11
     function __construct()
12 12
     {
13
-        $this->upload_path = PATH_UPLOAD.'1'. DIRECTORY_SEPARATOR;
13
+        $this->upload_path = PATH_UPLOAD.'1'.DIRECTORY_SEPARATOR;
14 14
         $this->tempdir_path = $this->upload_path.PATH_UPLOAD_TEMPORARY;
15 15
     }
16 16
 }
Please login to merge, or discard this patch.
tests/unit/Filehandler/ImageHandlerTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
 
31 31
         $data = array('file_name' => $this->file_name);
32 32
         $filehandler = new FileHandler($this->createKernel());
33
-        copy(dirname(__FILE__) . '/'.$this->file_name, PATH_UPLOAD.$this->file_name);
33
+        copy(dirname(__FILE__).'/'.$this->file_name, PATH_UPLOAD.$this->file_name);
34 34
         $filehandler->save(PATH_UPLOAD.$this->file_name, $this->file_name);
35 35
         $filehandler->load();
36 36
         $this->assertEquals('', $filehandler->error->view());
Please login to merge, or discard this patch.
tests/unit/Newsletter/NewsletterTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
 
19 19
     function getSubscribers()
20 20
     {
21
-        for ($i = 0; $i<10000; $i++) {
21
+        for ($i = 0; $i < 10000; $i++) {
22 22
             $array[] = array(
23 23
                 'contact_id' => '1',
24 24
                 'contact_email' => '[email protected]'
Please login to merge, or discard this patch.