settings = CompanySettings::defaults(); } /* public function testPdfVariableDefaults() { $pdf_variables = $this->settings->pdf_variables; $this->assertEquals(ctrans('texts.client_name'), $pdf_variables->client_details->{'$client.name'}); } public function testPdfVariablesConvertedToArray() { $pdf_variables = json_decode(json_encode($this->settings->pdf_variables), true); $this->assertEquals(ctrans('texts.client_name'), $pdf_variables['client_details']['$client.name']); } public function testReplaceSampleHeaderText() { $pdf_variables = iterator_to_array(new \RecursiveIteratorIterator(new \RecursiveArrayIterator($this->settings->pdf_variables))); //\Log::error(print_r($pdf_variables,1)); $sample_header_text = '$client.name$product.product_key$product.line_total'; $replaced_header_text = str_replace(array_keys($pdf_variables), array_values($pdf_variables), $sample_header_text); $this->assertEquals($replaced_header_text, 'Client NameProductLine Total'); } */ }