makeTestData(); $this->withoutMiddleware( ThrottleRequests::class ); } public function testInvoiceGeneration() { $f = new FacturaEInvoice($this->invoice, "3.2.2"); $path = $f->run(); $this->assertNotNull($f->run()); nlog($f->run()); // $this->assertTrue($this->validateInvoiceXML($path)); } // private function validateInvoiceXML($path) { // $jar = (new \GuzzleHttp\Cookie\CookieJar())->toArray(); // echo print_r($jar); // $response = Http::withCookies($jar, '.ninja.test')->attach( // 'xmlFile', // Storage::get($path), // basename($path) // )->post('https://viewer.facturadirecta.com/dp/viewer/upload.void'); // Instance of Guzzle/CookieJar // echo print_r($jar); // $response = Http::withCookies($jar, '.ninja.test')->post('https://viewer.facturadirecta.com/dp/viewer/viewer.void'); // echo print_r($response->body(), 1); // } }