makeTestData(); Session::start(); $this->faker = \Faker\Factory::create(); Model::reguard(); } public function testPreviewDesign() { $design = Design::find(3); // $designer = new Designer($this->invoice, $design, $this->company->settings->pdf_variables, 'invoice'); $data = [ 'entity' => 'invoice', 'entity_id' => $this->invoice->hashed_id, 'design' => $design, ]; $response = $this->withHeaders([ 'X-API-SECRET' => config('ninja.api_secret'), 'X-API-TOKEN' => $this->token ])->post('/api/v1/preview', $data); $response->assertStatus(200); // $arr = $response->json(); // \Log::error($arr); } public function testBlankEntityPreviewDesign() { $design = Design::find(3); $data = [ 'design' => $design, ]; $response = $this->withHeaders([ 'X-API-SECRET' => config('ninja.api_secret'), 'X-API-TOKEN' => $this->token ])->post('/api/v1/preview', $data); $response->assertStatus(200); // $arr = $response->json(); // \Log::error($arr); } }