Пример #1
0
 /**
  * Receipt Create test
  *
  * @return void
  */
 public function testCreateReceipt()
 {
     $receipt = ['aa' => $this->faker->numberBetween(10000, 1000000), 'afm' => $this->faker->numberBetween(100000000, 999999999), 'eponimia' => $this->faker->name, 'poso' => $this->faker->randomFloat(2, 1, 5000), 'image' => $this->faker->imageUrl(), 'printed_at' => 1433794593];
     $endpoint = $this->getEndpointWithToken($this->endpoint);
     $this->call('POST', $endpoint, $receipt);
     //fetch inserted receipt
     $inserted_receipt = Receipt::whereAfm($receipt['afm'])->whereAa($receipt['aa'])->first();
     $this->assertInstanceOf('App\\Receipt', $inserted_receipt);
 }