BaseTest.php 815 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. use Illuminate\Http\UploadedFile;
  3. use Illuminate\Support\Facades\Storage;
  4. use Tests\TestCase;
  5. class BaseTest extends TestCase
  6. {
  7. const CONSTANT = "Hello world.";
  8. /**
  9. * @test
  10. */
  11. public function test_001()
  12. {
  13. dump(self::CONSTANT);
  14. $this->assertTrue(true);
  15. }
  16. public function testPrintPart(){
  17. $service = app(\App\Services\PrintPartService::class);
  18. $item = $service->getImagePart();
  19. dd($item);
  20. }
  21. public function testPushPartiImg()
  22. {
  23. Storage::fake('avatars');
  24. $file = UploadedFile::fake()->image('avatar.jpg');
  25. $response = $this->json('POST', 'apiLocal/maintenance/expressPrinting/part/pushImage', [
  26. 'name' => 'SF',
  27. 'file' => $file,
  28. ]);
  29. dd($response);
  30. }
  31. }