@@ -37,6 +37,6 @@ |
||
| 37 | 37 | */ |
| 38 | 38 | public function setPasswordAttribute($value) |
| 39 | 39 | { |
| 40 | - $this->attributes['password'] = bcrypt( $value ); |
|
| 40 | + $this->attributes['password'] = bcrypt($value); |
|
| 41 | 41 | } |
| 42 | 42 | } |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | $app['config']->set('database.default', 'testing'); |
| 31 | 31 | } |
| 32 | 32 | |
| 33 | - protected function setUp () |
|
| 33 | + protected function setUp() |
|
| 34 | 34 | { |
| 35 | 35 | parent::setUp(); |
| 36 | 36 | |
@@ -38,17 +38,17 @@ discard block |
||
| 38 | 38 | |
| 39 | 39 | Route::middleware('web')->group(function() { |
| 40 | 40 | |
| 41 | - Route::get('/ticket/export/{id}', [ 'as' => 'ticket.export.progress', 'uses' => 'Ladybirdweb\ImportExport\Export@showExportStatus']); |
|
| 41 | + Route::get('/ticket/export/{id}', ['as' => 'ticket.export.progress', 'uses' => 'Ladybirdweb\ImportExport\Export@showExportStatus']); |
|
| 42 | 42 | |
| 43 | - Route::get( '/export/{id}/download', [ 'as' => 'ladybirdweb.export.download', 'uses' => 'Ladybirdweb\ImportExport\Export@downloadExportedFile']); |
|
| 43 | + Route::get('/export/{id}/download', ['as' => 'ladybirdweb.export.download', 'uses' => 'Ladybirdweb\ImportExport\Export@downloadExportedFile']); |
|
| 44 | 44 | |
| 45 | 45 | }); |
| 46 | 46 | |
| 47 | - Storage::putFileAs('exports', new File( __DIR__ . '/storage/test/test.csv' ), 'test.xls'); |
|
| 47 | + Storage::putFileAs('exports', new File(__DIR__.'/storage/test/test.csv'), 'test.xls'); |
|
| 48 | 48 | |
| 49 | 49 | $this->export = ModelExport::create([ |
| 50 | 50 | 'file' => 'test.xls', |
| 51 | - 'query' => User::select([ 'name', 'email', 'created_at' ])->getModel(), |
|
| 51 | + 'query' => User::select(['name', 'email', 'created_at'])->getModel(), |
|
| 52 | 52 | 'type' => 'xls' |
| 53 | 53 | ]); |
| 54 | 54 | } |
@@ -60,9 +60,9 @@ discard block |
||
| 60 | 60 | { |
| 61 | 61 | Queue::fake(); |
| 62 | 62 | |
| 63 | - $export = Export::export( User::select([ 'name', 'email', 'created_at' ]), 'xls' ); |
|
| 63 | + $export = Export::export(User::select(['name', 'email', 'created_at']), 'xls'); |
|
| 64 | 64 | |
| 65 | - $this->assertInstanceOf( ModelExport::class, $export ); |
|
| 65 | + $this->assertInstanceOf(ModelExport::class, $export); |
|
| 66 | 66 | |
| 67 | 67 | Queue::assertPushedOn('exporting', ExportJob::class); |
| 68 | 68 | } |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | */ |
| 73 | 73 | public function see_export_progress_page() |
| 74 | 74 | { |
| 75 | - $response = $this->get('/ticket/export/' . $this->export->id); |
|
| 75 | + $response = $this->get('/ticket/export/'.$this->export->id); |
|
| 76 | 76 | |
| 77 | 77 | $response->assertStatus(200); |
| 78 | 78 | |
@@ -84,13 +84,13 @@ discard block |
||
| 84 | 84 | */ |
| 85 | 85 | public function check_export_progress_ajax() |
| 86 | 86 | { |
| 87 | - $response = $this->json( 'GET', '/export/' . $this->export->id . '/progress'); |
|
| 87 | + $response = $this->json('GET', '/export/'.$this->export->id.'/progress'); |
|
| 88 | 88 | |
| 89 | 89 | $response->assertStatus(200); |
| 90 | 90 | |
| 91 | - $response->assertJsonFragment( ['status' => 200] ); |
|
| 91 | + $response->assertJsonFragment(['status' => 200]); |
|
| 92 | 92 | |
| 93 | - $response->assertJsonFragment( ['progress'] ); |
|
| 93 | + $response->assertJsonFragment(['progress']); |
|
| 94 | 94 | } |
| 95 | 95 | |
| 96 | 96 | /** |
@@ -98,9 +98,9 @@ discard block |
||
| 98 | 98 | */ |
| 99 | 99 | public function try_download_exported_file() |
| 100 | 100 | { |
| 101 | - $response = $this->get('/export/' . $this->export->id . '/download'); |
|
| 101 | + $response = $this->get('/export/'.$this->export->id.'/download'); |
|
| 102 | 102 | |
| 103 | - $response->assertHeader( 'content-disposition', 'attachment; filename="test.xls"'); |
|
| 103 | + $response->assertHeader('content-disposition', 'attachment; filename="test.xls"'); |
|
| 104 | 104 | |
| 105 | 105 | $response->assertStatus(200); |
| 106 | 106 | } |