/**
  * Создание Заказа
  * @dataProvider getOrdersDataArr
  * @param $purchase_id
  * @param $product_id
  * @param $amount
  * @return array
  */
 public function testMakeOrder($purchase_id, $product_id, $amount)
 {
     \Session::start();
     $user = \App\User::find(8);
     $response = $this->actingAs($user)->post('/rest/order', ['_token' => \Session::token(), 'purchase_id' => $purchase_id, 'product_id' => $product_id, 'amount' => $amount], ['X-Requested-With' => 'XMLHttpRequest'])->response;
     $this->assertResponseOk();
     //\Storage::disk('local')->put('tests/makeProduct_'.$this->getDataSetAsString().'.json', $response->content());
     $order_mix = json_decode($response->content());
     $order_id = $order_mix->id;
     $order = \App\BusinessLogic\Models\Order::find($order_id);
     $this->assertNotNull($order);
     $this->assertEquals($purchase_id, $order->purchase_id);
     $this->assertEquals($product_id, $order->product_id);
     $this->assertEquals($user->id, $order->user_id);
     //\Storage::disk('local')->put('tests/makeProduct.html', $response->content());
 }
 /**
  * Возвращает модель заказа
  * @param $order_id
  * @return mixed
  */
 public function getOrder($order_id)
 {
     return \App\BusinessLogic\Models\Order::find($order_id);
 }