Test Failed
Branch develop (e68766)
by Abhishek Kumar
03:33
created
tests/ImportExportLogTest.php 1 patch
Indentation   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -11,49 +11,49 @@
 block discarded – undo
11 11
 
12 12
 class ImportExportLogTest extends TestCase
13 13
 {
14
-	use RefreshDatabase;
14
+    use RefreshDatabase;
15 15
 
16
-	protected $import;
16
+    protected $import;
17 17
 
18
-	protected function setUp ()
19
-	{
20
-	    parent::setUp();
18
+    protected function setUp ()
19
+    {
20
+        parent::setUp();
21 21
 
22
-		$this->import = Import::create([
23
-			'file' => 'imports/import-1530262997.csv',
24
-			'file_rows' => 104,
25
-			'db_cols' => [ 'name', 'email', 'password'],
26
-			'model_map' => ['email', 'name', 'password']
27
-		]);
28
-	}
22
+        $this->import = Import::create([
23
+            'file' => 'imports/import-1530262997.csv',
24
+            'file_rows' => 104,
25
+            'db_cols' => [ 'name', 'email', 'password'],
26
+            'model_map' => ['email', 'name', 'password']
27
+        ]);
28
+    }
29 29
 
30
-	/**
31
-	* @test
32
-	*/
33
-	public function save_new_log()
34
-	{
35
-		$import = $this->import;
30
+    /**
31
+     * @test
32
+     */
33
+    public function save_new_log()
34
+    {
35
+        $import = $this->import;
36 36
 
37
-		$result = ImportExportLog::logImportError( $import, ['data' => 'this is test data'], 'This is not expected' );
37
+        $result = ImportExportLog::logImportError( $import, ['data' => 'this is test data'], 'This is not expected' );
38 38
 
39
-		$this->assertInstanceOf( ModelImportExportLog::class, $result );
40
-	}
39
+        $this->assertInstanceOf( ModelImportExportLog::class, $result );
40
+    }
41 41
 
42
-	/**
43
-	* @test
44
-	*/
45
-	public function get_saved_logs()
46
-	{
47
-		$import = $this->import;
42
+    /**
43
+     * @test
44
+     */
45
+    public function get_saved_logs()
46
+    {
47
+        $import = $this->import;
48 48
 
49
-		$log = ImportExportLog::logImportError( $import, ['data' => 'this is test data'], 'This is not expected' );
49
+        $log = ImportExportLog::logImportError( $import, ['data' => 'this is test data'], 'This is not expected' );
50 50
 
51
-		$log_in_db = ImportExportLog::getLogs( $log->id );
51
+        $log_in_db = ImportExportLog::getLogs( $log->id );
52 52
 
53
-		$this->assertInternalType( 'array', $log_in_db );
53
+        $this->assertInternalType( 'array', $log_in_db );
54 54
 
55
-		$this->assertArrayHasKey( 'data', $log_in_db[0] );
55
+        $this->assertArrayHasKey( 'data', $log_in_db[0] );
56 56
 
57
-		$this->assertArrayHasKey( 'message', $log_in_db[0] );
58
-	}
57
+        $this->assertArrayHasKey( 'message', $log_in_db[0] );
58
+    }
59 59
 }
Please login to merge, or discard this patch.
src/Models/ImportExportLog.php 1 patch
Indentation   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -10,23 +10,23 @@  discard block
 block discarded – undo
10 10
 
11 11
 
12 12
     /**
13
-    * Relationship with import model
14
-    *
15
-    * @return void
16
-    */
13
+     * Relationship with import model
14
+     *
15
+     * @return void
16
+     */
17 17
     public function import()
18 18
     {
19
-    	return $this->belongsTo( \Ladybirdweb\ImportExport\Models\Import::class );
19
+        return $this->belongsTo( \Ladybirdweb\ImportExport\Models\Import::class );
20 20
     }
21 21
 
22 22
 
23 23
     /**
24
-    * Model Map accessor
25
-    *
26
-    * Unserialize data while retriving.
27
-    * @param $value
28
-    * @return string
29
-    */
24
+     * Model Map accessor
25
+     *
26
+     * Unserialize data while retriving.
27
+     * @param $value
28
+     * @return string
29
+     */
30 30
     public function getDataAttribute($value)
31 31
     {
32 32
         return unserialize( $value );
@@ -34,12 +34,12 @@  discard block
 block discarded – undo
34 34
 
35 35
 
36 36
     /**
37
-    * Model Map mulator
38
-    *
39
-    * Serialize data while storing.
40
-    * @param $value
41
-    * @return void
42
-    */
37
+     * Model Map mulator
38
+     *
39
+     * Serialize data while storing.
40
+     * @param $value
41
+     * @return void
42
+     */
43 43
     public function setDataAttribute($value)
44 44
     {
45 45
         $this->attributes['data'] = serialize( $value );
@@ -47,12 +47,12 @@  discard block
 block discarded – undo
47 47
 
48 48
 
49 49
     /**
50
-    * Model Map accessor
51
-    *
52
-    * Unserialize message while retriving.
53
-    * @param $value
54
-    * @return string
55
-    */
50
+     * Model Map accessor
51
+     *
52
+     * Unserialize message while retriving.
53
+     * @param $value
54
+     * @return string
55
+     */
56 56
     public function getMessageAttribute($value)
57 57
     {
58 58
         return unserialize( $value );
@@ -60,12 +60,12 @@  discard block
 block discarded – undo
60 60
 
61 61
 
62 62
     /**
63
-    * Model Map mulator
64
-    *
65
-    * Serialize message while storing.
66
-    * @param $value
67
-    * @return void
68
-    */
63
+     * Model Map mulator
64
+     *
65
+     * Serialize message while storing.
66
+     * @param $value
67
+     * @return void
68
+     */
69 69
     public function setMessageAttribute($value)
70 70
     {
71 71
         $this->attributes['message'] = serialize( $value );
Please login to merge, or discard this patch.
src/Models/Export.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -9,12 +9,12 @@  discard block
 block discarded – undo
9 9
     protected $fillable = [ 'file', 'type', 'query', 'result_rows'];
10 10
 
11 11
     /**
12
-    * Query accessor
13
-    *
14
-    * Unserialize query while retriving.
15
-    * @param $value
16
-    * @return string
17
-    */
12
+     * Query accessor
13
+     *
14
+     * Unserialize query while retriving.
15
+     * @param $value
16
+     * @return string
17
+     */
18 18
     public function getQueryAttribute($value)
19 19
     {
20 20
         return unserialize( $value );
@@ -22,12 +22,12 @@  discard block
 block discarded – undo
22 22
 
23 23
 
24 24
     /**
25
-    * Query mulator
26
-    *
27
-    * Serialize query while storing.
28
-    * @param $value
29
-    * @return void
30
-    */
25
+     * Query mulator
26
+     *
27
+     * Serialize query while storing.
28
+     * @param $value
29
+     * @return void
30
+     */
31 31
     public function setQueryAttribute($value)
32 32
     {
33 33
         $this->attributes['query'] = serialize( $value );
Please login to merge, or discard this patch.
src/Models/Import.php 1 patch
Indentation   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -6,27 +6,27 @@  discard block
 block discarded – undo
6 6
 
7 7
 class Import extends Model
8 8
 {
9
-	protected $fillable = ['file', 'file_rows', 'db_cols', 'row_processed'];
9
+    protected $fillable = ['file', 'file_rows', 'db_cols', 'row_processed'];
10 10
 
11 11
 
12 12
     /**
13
-    * Relationship with import export log model
14
-    *
15
-    * @return void
16
-    */
13
+     * Relationship with import export log model
14
+     *
15
+     * @return void
16
+     */
17 17
     public function importLogs()
18 18
     {
19
-    	return $this->hasMany( \Ladybirdweb\ImportExport\Models\ImportExportLog::class, 'op_id' );
19
+        return $this->hasMany( \Ladybirdweb\ImportExport\Models\ImportExportLog::class, 'op_id' );
20 20
     }
21 21
 
22 22
 
23 23
     /**
24
-    * Model Map accessor
25
-    *
26
-    * Unserialize model map while retriving.
27
-    * @param $value
28
-    * @return string
29
-    */
24
+     * Model Map accessor
25
+     *
26
+     * Unserialize model map while retriving.
27
+     * @param $value
28
+     * @return string
29
+     */
30 30
     public function getModelMapAttribute($value)
31 31
     {
32 32
         return unserialize( $value );
@@ -34,12 +34,12 @@  discard block
 block discarded – undo
34 34
 
35 35
 
36 36
     /**
37
-    * Model Map mulator
38
-    *
39
-    * Serialize model map while storing.
40
-    * @param $value
41
-    * @return void
42
-    */
37
+     * Model Map mulator
38
+     *
39
+     * Serialize model map while storing.
40
+     * @param $value
41
+     * @return void
42
+     */
43 43
     public function setModelMapAttribute($value)
44 44
     {
45 45
         $this->attributes['model_map'] = serialize( $value );
@@ -47,12 +47,12 @@  discard block
 block discarded – undo
47 47
 
48 48
 
49 49
     /**
50
-    * DB cols accessor
51
-    *
52
-    * Unserialize model map while retriving.
53
-    * @param $value
54
-    * @return string
55
-    */
50
+     * DB cols accessor
51
+     *
52
+     * Unserialize model map while retriving.
53
+     * @param $value
54
+     * @return string
55
+     */
56 56
     public function getDbColsAttribute($value)
57 57
     {
58 58
         return unserialize( $value );
@@ -60,12 +60,12 @@  discard block
 block discarded – undo
60 60
 
61 61
 
62 62
     /**
63
-    * Model Map mulator
64
-    *
65
-    * Serialize model map while storing.
66
-    * @param $value
67
-    * @return void
68
-    */
63
+     * Model Map mulator
64
+     *
65
+     * Serialize model map while storing.
66
+     * @param $value
67
+     * @return void
68
+     */
69 69
     public function setDbColsAttribute($value)
70 70
     {
71 71
         $this->attributes['db_cols'] = serialize( $value );
Please login to merge, or discard this patch.
src/ImportExportLog.php 1 patch
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -7,20 +7,20 @@
 block discarded – undo
7 7
 class ImportExportLog
8 8
 {
9 9
     
10
-	public function logImportError(Import $import, $data, $message)
11
-	{
12
-		// Create new log
13
-		return $import->importLogs()->create([
14
-			'data' => $data,
15
-			'message' => $message,
16
-		]);
17
-	}
10
+    public function logImportError(Import $import, $data, $message)
11
+    {
12
+        // Create new log
13
+        return $import->importLogs()->create([
14
+            'data' => $data,
15
+            'message' => $message,
16
+        ]);
17
+    }
18 18
 
19 19
 
20
-	public function getLogs($id)
21
-	{
22
-		// Get all logs of a import or export process
23
-		return Import::findOrFail( $id )->importLogs()->get( [ 'data', 'message' ] )->toArray();
24
-	}
20
+    public function getLogs($id)
21
+    {
22
+        // Get all logs of a import or export process
23
+        return Import::findOrFail( $id )->importLogs()->get( [ 'data', 'message' ] )->toArray();
24
+    }
25 25
 
26 26
 }
Please login to merge, or discard this patch.
src/Export.php 1 patch
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -9,24 +9,24 @@  discard block
 block discarded – undo
9 9
 class Export
10 10
 {
11 11
 	
12
-	public function export(Builder $query, $ext = 'xls')
13
-	{
14
-		// Create new export
15
-		$export = new ModelExport;
12
+    public function export(Builder $query, $ext = 'xls')
13
+    {
14
+        // Create new export
15
+        $export = new ModelExport;
16 16
 
17
-		$export->type = $ext;
18
-		$export->query = $query->getModel();
17
+        $export->type = $ext;
18
+        $export->query = $query->getModel();
19 19
 
20
-		$export->save();
20
+        $export->save();
21 21
 
22
-		ExportJob::dispatch( $export )->onQueue( 'exporting' );
22
+        ExportJob::dispatch( $export )->onQueue( 'exporting' );
23 23
 
24
-		return $export;
25
-	}
24
+        return $export;
25
+    }
26 26
 
27 27
 
28 28
 
29
-	public function showExportStatus($id)
29
+    public function showExportStatus($id)
30 30
     {
31 31
         // Map export instance
32 32
         $export = ModelExport::findOrFail( $id );
@@ -50,11 +50,11 @@  discard block
 block discarded – undo
50 50
 
51 51
         if ( $export->result_rows > 0 ) {
52 52
 
53
-        	$data['progress'] = round( ( $export->row_processed / $export->result_rows ) * 100 );
53
+            $data['progress'] = round( ( $export->row_processed / $export->result_rows ) * 100 );
54 54
 
55 55
         } else {
56 56
 
57
-        	$data['progress'] = 0;
57
+            $data['progress'] = 0;
58 58
 
59 59
         }
60 60
 
Please login to merge, or discard this patch.
src/ImportHandler.php 1 patch
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -8,10 +8,10 @@  discard block
 block discarded – undo
8 8
 class ImportHandler
9 9
 {
10 10
 	
11
-	function process(Import $import, callable $callback)
12
-	{
11
+    function process(Import $import, callable $callback)
12
+    {
13 13
 
14
-		// CSV header row show be excluded
14
+        // CSV header row show be excluded
15 15
         $csv_header = true;
16 16
 
17 17
         // Read csv
@@ -30,21 +30,21 @@  discard block
 block discarded – undo
30 30
 
31 31
             } else {
32 32
 
33
-            	// Drop ignore columns
33
+                // Drop ignore columns
34 34
                 $data = array_combine( $import->model_map, $csv_line );
35 35
                 unset( $data[''] );
36 36
 
37 37
                 // Call user callback with data
38 38
                 if ( $callback( $data ) ) {
39 39
 
40
-                	// If successful -> update imported rows
41
-                	$import->row_imported = $import->row_imported + 1;
40
+                    // If successful -> update imported rows
41
+                    $import->row_imported = $import->row_imported + 1;
42 42
 
43 43
                 }
44 44
 
45
-				// Update porcessed rows
46
-	            $import->row_processed = $processed_row;
47
-	            $import->save();
45
+                // Update porcessed rows
46
+                $import->row_processed = $processed_row;
47
+                $import->save();
48 48
 
49 49
                 $processed_row++;
50 50
             }
@@ -58,5 +58,5 @@  discard block
 block discarded – undo
58 58
         $import->completed_at = Carbon::now();
59 59
         $import->save();
60 60
 
61
-	}
61
+    }
62 62
 }
Please login to merge, or discard this patch.
tests/ImportTest.php 1 patch
Indentation   +95 added lines, -95 removed lines patch added patch discarded remove patch
@@ -15,103 +15,103 @@
 block discarded – undo
15 15
 
16 16
 class ImportTest extends TestCase
17 17
 {
18
-	use RefreshDatabase;
18
+    use RefreshDatabase;
19 19
 
20
-	protected $import;
20
+    protected $import;
21 21
 
22
-	protected function setUp ()
23
-	{
24
-	    parent::setUp();
22
+    protected function setUp ()
23
+    {
24
+        parent::setUp();
25 25
 
26
-	    Route::middleware('web')->group(function() {
26
+        Route::middleware('web')->group(function() {
27 27
 		    
28
-			Route::get( '/import/{id}/progress', [ 'as' => 'ladybirdweb.import.ajax.progress', 'uses' => 'Ladybirdweb\ImportExport\Import@returnImportProgress']);
29
-
30
-		});
31
-
32
-		Storage::putFileAs('imports', new File( storage_path( 'test/test.csv' ) ), 'test.csv');
33
-
34
-		$this->import = ModelImport::create([
35
-			'file' => 'imports/test.csv',
36
-			'file_rows' => 104,
37
-			'db_cols' => [ 'name', 'email', 'password'],
38
-			'model_map' => ['email', 'name', 'password']
39
-		]);
40
-	}
41
-
42
-	/**
43
-	* @test
44
-	*/
45
-	public function create_new_import_success()
46
-	{
47
-		$import = Import::createImport('imports/test.csv', [ 'name', 'email', 'password']);
48
-
49
-		$this->assertInstanceOf(ModelImport::class, $import);
50
-	}
51
-
52
-	/**
53
-	* @test
54
-	*/
55
-	public function fetch_import()
56
-	{
57
-		$import = Import::getImport($this->import->id);
58
-
59
-		$this->assertInstanceOf(ModelImport::class, $import);
60
-	}
61
-
62
-	/**
63
-	* @test
64
-	*/
65
-	public function get_few_rows_from_uploaded_file()
66
-	{
67
-		$csv_data = Import::getImportFileData($this->import->id);
68
-
69
-		$this->assertInternalType( 'array', $csv_data );
70
-	}
71
-
72
-	/**
73
-	* @test
74
-	*/
75
-	public function store_data_map_with_csv_cols()
76
-	{
77
-		$import = Import::setDataMap(['email', 'name', 'password'], $this->import->id);
78
-
79
-		$this->assertInstanceOf(ModelImport::class, $import);
80
-	}
81
-
82
-	/**
83
-	* @test
84
-	*/
85
-	public function sucess_to_dispatch_given_job_class()
86
-	{
87
-		$import = $id = $this->import;
88
-
89
-		Queue::fake();
90
-
91
-		Import::dispatchImportJob( FakeJob::class, $import );
92
-
93
-		Queue::assertPushedOn('importing', FakeJob::class);
94
-	}
95
-
96
-	/**
97
-	* @test
98
-	*/
99
-	public function check_import_progress()
100
-	{
101
-		$response = $this->json( 'GET', '/import/1/progress' );
102
-
103
-		$response->assertStatus(200);
104
-
105
-		$response->assertJsonFragment( ['status' => 200] );
106
-
107
-		$response->assertJsonFragment( ['progress'] );
108
-	}
109
-
110
-	/**
111
-	* @test
112
-	*/
113
-	public function remove_import()
114
-	{
115
-		$this->assertTrue(Import::removeImport($this->import->id));
116
-	}
28
+            Route::get( '/import/{id}/progress', [ 'as' => 'ladybirdweb.import.ajax.progress', 'uses' => 'Ladybirdweb\ImportExport\Import@returnImportProgress']);
29
+
30
+        });
31
+
32
+        Storage::putFileAs('imports', new File( storage_path( 'test/test.csv' ) ), 'test.csv');
33
+
34
+        $this->import = ModelImport::create([
35
+            'file' => 'imports/test.csv',
36
+            'file_rows' => 104,
37
+            'db_cols' => [ 'name', 'email', 'password'],
38
+            'model_map' => ['email', 'name', 'password']
39
+        ]);
40
+    }
41
+
42
+    /**
43
+     * @test
44
+     */
45
+    public function create_new_import_success()
46
+    {
47
+        $import = Import::createImport('imports/test.csv', [ 'name', 'email', 'password']);
48
+
49
+        $this->assertInstanceOf(ModelImport::class, $import);
50
+    }
51
+
52
+    /**
53
+     * @test
54
+     */
55
+    public function fetch_import()
56
+    {
57
+        $import = Import::getImport($this->import->id);
58
+
59
+        $this->assertInstanceOf(ModelImport::class, $import);
60
+    }
61
+
62
+    /**
63
+     * @test
64
+     */
65
+    public function get_few_rows_from_uploaded_file()
66
+    {
67
+        $csv_data = Import::getImportFileData($this->import->id);
68
+
69
+        $this->assertInternalType( 'array', $csv_data );
70
+    }
71
+
72
+    /**
73
+     * @test
74
+     */
75
+    public function store_data_map_with_csv_cols()
76
+    {
77
+        $import = Import::setDataMap(['email', 'name', 'password'], $this->import->id);
78
+
79
+        $this->assertInstanceOf(ModelImport::class, $import);
80
+    }
81
+
82
+    /**
83
+     * @test
84
+     */
85
+    public function sucess_to_dispatch_given_job_class()
86
+    {
87
+        $import = $id = $this->import;
88
+
89
+        Queue::fake();
90
+
91
+        Import::dispatchImportJob( FakeJob::class, $import );
92
+
93
+        Queue::assertPushedOn('importing', FakeJob::class);
94
+    }
95
+
96
+    /**
97
+     * @test
98
+     */
99
+    public function check_import_progress()
100
+    {
101
+        $response = $this->json( 'GET', '/import/1/progress' );
102
+
103
+        $response->assertStatus(200);
104
+
105
+        $response->assertJsonFragment( ['status' => 200] );
106
+
107
+        $response->assertJsonFragment( ['progress'] );
108
+    }
109
+
110
+    /**
111
+     * @test
112
+     */
113
+    public function remove_import()
114
+    {
115
+        $this->assertTrue(Import::removeImport($this->import->id));
116
+    }
117 117
 }
Please login to merge, or discard this patch.
tests/ExportTest.php 1 patch
Indentation   +62 added lines, -62 removed lines patch added patch discarded remove patch
@@ -16,90 +16,90 @@
 block discarded – undo
16 16
 
17 17
 class ExportTest extends TestCase
18 18
 {
19
-	use RefreshDatabase;
19
+    use RefreshDatabase;
20 20
 
21
-	protected $export;
21
+    protected $export;
22 22
 
23
-	protected function setUp ()
24
-	{
25
-	    parent::setUp();
23
+    protected function setUp ()
24
+    {
25
+        parent::setUp();
26 26
 
27
-	    Route::middleware('web')->group(function() {
27
+        Route::middleware('web')->group(function() {
28 28
 
29
-			Route::get('/ticket/export/{id}', [ 'as' => 'ticket.export.progress', 'uses' => 'Ladybirdweb\ImportExport\Export@showExportStatus']);
29
+            Route::get('/ticket/export/{id}', [ 'as' => 'ticket.export.progress', 'uses' => 'Ladybirdweb\ImportExport\Export@showExportStatus']);
30 30
 
31
-			Route::get( '/export/{id}/download',  [ 'as' => 'ladybirdweb.export.download', 'uses' => 'Ladybirdweb\ImportExport\Export@downloadExportedFile']);
31
+            Route::get( '/export/{id}/download',  [ 'as' => 'ladybirdweb.export.download', 'uses' => 'Ladybirdweb\ImportExport\Export@downloadExportedFile']);
32 32
 
33
-		});
33
+        });
34 34
 
35
-		Storage::putFileAs('exports', new File( storage_path( 'test/test.csv' ) ), 'test.xls');
35
+        Storage::putFileAs('exports', new File( storage_path( 'test/test.csv' ) ), 'test.xls');
36 36
 
37
-		$this->export = ModelExport::create([
38
-			'file' => 'test.xls',
39
-			'query' => \App\Models\User::select([ 'name', 'email', 'created_at' ])->getModel(),
40
-			'type' => 'xls'
41
-		]);
42
-	}
37
+        $this->export = ModelExport::create([
38
+            'file' => 'test.xls',
39
+            'query' => \App\Models\User::select([ 'name', 'email', 'created_at' ])->getModel(),
40
+            'type' => 'xls'
41
+        ]);
42
+    }
43 43
 
44
-	/**
45
-	* @test
46
-	*/
47
-	public function data_export_initiated_and_dispatched()
48
-	{
49
-		Queue::fake();
44
+    /**
45
+     * @test
46
+     */
47
+    public function data_export_initiated_and_dispatched()
48
+    {
49
+        Queue::fake();
50 50
 
51
-		$export = Export::export( \App\Models\User::select([ 'name', 'email', 'created_at' ]), 'xls' );
51
+        $export = Export::export( \App\Models\User::select([ 'name', 'email', 'created_at' ]), 'xls' );
52 52
 
53
-		$this->assertInstanceOf( ModelExport::class, $export );
53
+        $this->assertInstanceOf( ModelExport::class, $export );
54 54
 
55
-		Queue::assertPushedOn('exporting', ExportJob::class);
56
-	}
55
+        Queue::assertPushedOn('exporting', ExportJob::class);
56
+    }
57 57
 
58
-	/**
59
-	* @test
60
-	*/
61
-	public function see_export_progress_page()
62
-	{
63
-		$response =  $this->get('/ticket/export/' . $this->export->id);
58
+    /**
59
+     * @test
60
+     */
61
+    public function see_export_progress_page()
62
+    {
63
+        $response =  $this->get('/ticket/export/' . $this->export->id);
64 64
 
65
-		$response->assertStatus(200);
65
+        $response->assertStatus(200);
66 66
 
67
-		$response->assertSee('Export');
68
-	}
67
+        $response->assertSee('Export');
68
+    }
69 69
 
70
-	/**
71
-	* @test
72
-	*/
73
-	public function check_export_progress_ajax()
74
-	{
75
-		$response = $this->json( 'GET', '/export/' . $this->export->id . '/progress');
70
+    /**
71
+     * @test
72
+     */
73
+    public function check_export_progress_ajax()
74
+    {
75
+        $response = $this->json( 'GET', '/export/' . $this->export->id . '/progress');
76 76
 
77
-		$response->assertStatus(200);
77
+        $response->assertStatus(200);
78 78
 
79
-		$response->assertJsonFragment( ['status' => 200] );
79
+        $response->assertJsonFragment( ['status' => 200] );
80 80
 
81
-		$response->assertJsonFragment( ['progress'] );
82
-	}
81
+        $response->assertJsonFragment( ['progress'] );
82
+    }
83 83
 
84
-	/**
85
-	* @test
86
-	*/
87
-	public function try_download_exported_file()
88
-	{
89
-		$response = $this->get('/export/' . $this->export->id . '/download');
84
+    /**
85
+     * @test
86
+     */
87
+    public function try_download_exported_file()
88
+    {
89
+        $response = $this->get('/export/' . $this->export->id . '/download');
90 90
 
91
-		$response->assertHeader( 'content-disposition', 'attachment; filename="test.xls"');
91
+        $response->assertHeader( 'content-disposition', 'attachment; filename="test.xls"');
92 92
 
93
-		$response->assertStatus(200);
94
-	}
93
+        $response->assertStatus(200);
94
+    }
95 95
 
96
-	/**
97
-	* @test
98
-	*/
99
-	public function fail_download_exported_file()
100
-	{
101
-		$response = $this->get('/export/987654321/download');
96
+    /**
97
+     * @test
98
+     */
99
+    public function fail_download_exported_file()
100
+    {
101
+        $response = $this->get('/export/987654321/download');
102 102
 
103
-		$response->assertStatus(404);
104
-	}
103
+        $response->assertStatus(404);
104
+    }
105 105
 }
Please login to merge, or discard this patch.