json('GET', '/api/warehousearr'); // $response->assertStatus(200); // } public function testPOST() { $response = $this->json('POST', '/api/warehousearr', [ 'so_id'=> '3', 'receive_on'=> '2018-03-01', 'transport_company_name'=> 'TEScief', 'consignment_note_no'=> '3', 'warehouse_receive_note_no'=> '3', 'receiving_person'=> 'TEST', 'marking_number'=> '3', 'image'=> 'test.jpg', 'warehouseitem' => [ 0 => [ 'description'=> 'CIEFhuhuuh', 'nominal_ctn'=> '1', 'actual_ctn'=> '1', 'nominal_measurement'=> '1', 'actual_measurement'=> '1', 'nominal_weight'=> '1', 'actual_weight'=> '1', 'balance'=> '2', 'isDamaged'=> '1', 'status'=> 'ok', 'image'=> 'test.jpg', 'wa_id'=> '11', ], 1 => [ 'description'=> 'CIE', 'nominal_ctn'=> '1', 'actual_ctn'=> '1', 'nominal_measurement'=> '1', 'actual_measurement'=> '1', 'nominal_weight'=> '1', 'actual_weight'=> '1', 'balance'=> '2', 'isDamaged'=> '1', 'status'=> 'ok', 'image'=> 'test.jpg', 'wa_id'=> '11', ] ] ]); // dd($response->getContent()); $response->assertStatus(201); } // public function testPUT() // { // $response = $this->json('PUT', '/api/warehousearr/30', // [ // 'so_id'=> '3', // 'receive_on'=> '2018-03-01', // 'transport_company_name'=> 'TEScief', // 'consignment_note_no'=> '3', // 'warehouse_receive_note_no'=> '3', // 'receiving_person'=> 'TEST', // 'marking_number'=> '3', // 'image'=> 'test.jpg', // 'warehouseitem' => [ // 0 => [ // 'description'=> 'CIEFhuhuuh', // 'nominal_ctn'=> '1', // 'actual_ctn'=> '1', // 'nominal_measurement'=> '1', // 'actual_measurement'=> '1', // 'nominal_weight'=> '1', // 'actual_weight'=> '1', // 'balance'=> '2', // 'isDamaged'=> '1', // 'status'=> 'ok', // 'image'=> 'test.jpg', // 'wa_id'=> '4', // 'soitem_id'=> '4' // ], // ] // ]); // // dd($response->getContent()); // $response->assertStatus(201); // } // public function testUploadWarehouseImage() // { // Storage::fake('warehouse_picture'); // $response = $this->actingAs($this->user) // ->json('POST', '/warehousearr/warehouse_picture/1', [ // 'warehouse_picture' => UploadedFile::fake()->image('test.jpg') // ]); // // dd($response->getContent()); // $response->assertStatus(201); // } // public function testUploadWarehouseItemImage() // { // Storage::fake('warehouse_picture'); // $response = $this->actingAs($this->user) // ->json('POST', '/warehousearr/warehouse_item_picture/1', [ // 'warehouse_item_picture' => UploadedFile::fake()->image('test.jpg') // ]); // // dd($response->getContent()); // $response->assertStatus(201); // } }