mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-10-31 16:37:31 -04:00 
			
		
		
		
	Fixes for tests
This commit is contained in:
		
							parent
							
								
									dc4ccd57ca
								
							
						
					
					
						commit
						56744fc78c
					
				| @ -65,7 +65,7 @@ class BaseExport | ||||
|         'id_number' => 'vendor.id_number', | ||||
|         'name' => 'vendor.name', | ||||
|         'number' => 'vendor.number', | ||||
|         'client_phone' => 'vendor.phone', | ||||
|         'phone' => 'vendor.phone', | ||||
|         'postal_code' => 'vendor.postal_code', | ||||
|         'private_notes' => 'vendor.private_notes', | ||||
|         'public_notes' => 'vendor.public_notes', | ||||
| @ -657,7 +657,7 @@ class BaseExport | ||||
|         // nlog("searching for {$column}");
 | ||||
|         $transformed_invoice = false; | ||||
| 
 | ||||
|         if($transformer instanceof PaymentTransformer && ($entity->invoice ?? false)) { | ||||
|         if($transformer instanceof PaymentTransformer && ($entity->invoices ?? false)) { | ||||
|             $transformed_invoices = $transformer->includeInvoices($entity); | ||||
| 
 | ||||
|             $manager = new Manager(); | ||||
|  | ||||
| @ -119,7 +119,7 @@ class VendorExport extends BaseExport | ||||
| 
 | ||||
|             if (is_array($parts) && $parts[0] == 'vendor' && array_key_exists($parts[1], $transformed_vendor)) { | ||||
|                 $entity[$key] = $transformed_vendor[$parts[1]]; | ||||
|             } elseif (is_array($parts) && $parts[0] == 'vendor_contact' && array_key_exists($parts[1], $transformed_contact)) { | ||||
|             } elseif (is_array($parts) && $parts[0] == 'vendor_contact' && isset($transformed_contact[$parts[1]])) { | ||||
|                 $entity[$key] = $transformed_contact[$parts[1]]; | ||||
|             } else { | ||||
|                 $entity[$key] = $this->resolveKey($key, $vendor, $this->vendor_transformer); | ||||
|  | ||||
| @ -293,7 +293,7 @@ class ReportCsvGenerationTest extends TestCase | ||||
|         ])->post('/api/v1/reports/vendors', $data); | ||||
|         | ||||
|         $csv = $response->streamedContent(); | ||||
| 
 | ||||
| nlog($csv); | ||||
|         $this->assertEquals('Vendor 1', $this->getFirstValueByColumn($csv, 'Vendor Name')); | ||||
|         $this->assertEquals('1234', $this->getFirstValueByColumn($csv, 'Vendor Number')); | ||||
|         $this->assertEquals('city', $this->getFirstValueByColumn($csv, 'Vendor City')); | ||||
| @ -345,9 +345,9 @@ class ReportCsvGenerationTest extends TestCase | ||||
|         | ||||
|         $csv = $response->streamedContent(); | ||||
| 
 | ||||
|         $this->assertEquals('Vendor 1', $this->getFirstValueByColumn($csv, 'Name')); | ||||
|         $this->assertEquals('1234', $this->getFirstValueByColumn($csv, 'Number')); | ||||
|         $this->assertEquals('city', $this->getFirstValueByColumn($csv, 'City')); | ||||
|         $this->assertEquals('Vendor 1', $this->getFirstValueByColumn($csv, 'Vendor Name')); | ||||
|         $this->assertEquals('1234', $this->getFirstValueByColumn($csv, 'Vendor Number')); | ||||
|         $this->assertEquals('city', $this->getFirstValueByColumn($csv, 'Vendor City')); | ||||
|     } | ||||
| 
 | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user