Skip to content

Commit 404d187

Browse files
authored
Merge pull request #48 from qcod/L7-support
added Laravel 7 support
2 parents f2606ab + 4e5af72 commit 404d187

File tree

6 files changed

+202
-185
lines changed

6 files changed

+202
-185
lines changed

composer.json

+4-7
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@
1111
"image resize",
1212
"intervention image",
1313
"eloquent",
14-
"model",
15-
"laravel5"
14+
"model"
1615
],
1716
"authors": [
1817
{
@@ -21,15 +20,13 @@
2120
}
2221
],
2322
"require": {
24-
"php": ">=5.6.0",
23+
"php": "^7.2",
2524
"laravel/framework": "~5.4.0|~5.5.0|~5.6.0|~5.7.0|~5.8.0|^6.0|^7.0",
2625
"intervention/image": "^2.4"
2726
},
2827
"require-dev": {
29-
"orchestra/testbench": "3.8.*|4.*|5.*",
30-
"orchestra/database": "~3.4.0",
31-
"mockery/mockery": "^0.9.4 || ~1.0",
32-
"phpunit/phpunit": "~8.5"
28+
"orchestra/testbench": "^4.0|^5.0",
29+
"phpunit/phpunit": "^8.0|^9.0"
3330
},
3431
"autoload": {
3532
"psr-4": {

tests/FileUpTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
class FileUpTest extends TestCase
1111
{
12-
public function setUp()
12+
public function setUp(): void
1313
{
1414
parent::setUp();
1515

@@ -96,7 +96,7 @@ public function it_auto_upload_files()
9696
$response = $this->post('/test/users-file', $data);
9797
$user = $response->original;
9898

99-
$response->assertStatus(200);
99+
$response->assertStatus(201);
100100

101101
// Assert the file was stored...
102102
Storage::disk('public')->assertExists('resumes/' . $resume->hashName());

tests/ImageResizeTest.php

+22-22
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class ImageResizeTest extends TestCase
1111
protected $newImage;
1212
protected $user;
1313

14-
protected function setUp()
14+
protected function setUp(): void
1515
{
1616
parent::setUp();
1717

@@ -20,7 +20,7 @@ protected function setUp()
2020
$this->assertTrue(file_exists($this->testImage), 'Test image file do not exists.');
2121
}
2222

23-
protected function tearDown()
23+
protected function tearDown(): void
2424
{
2525
parent::tearDown();
2626

@@ -31,10 +31,10 @@ protected function tearDown()
3131

3232

3333
/**
34-
* it resize image based on width given
35-
*
36-
* @test
37-
*/
34+
* it resize image based on width given
35+
*
36+
* @test
37+
*/
3838
public function it_resize_image_based_on_width_given()
3939
{
4040
$this->newImage = $this->user->resizeImage($this->testImage, ['width' => 300]);
@@ -43,10 +43,10 @@ public function it_resize_image_based_on_width_given()
4343
}
4444

4545
/**
46-
* it resize image by height
47-
*
48-
* @test
49-
*/
46+
* it resize image by height
47+
*
48+
* @test
49+
*/
5050
public function it_resize_image_by_height()
5151
{
5252
$this->newImage = $this->user->resizeImage($this->testImage, ['height' => 200]);
@@ -55,10 +55,10 @@ public function it_resize_image_by_height()
5555
}
5656

5757
/**
58-
* it crops image in given width and height
59-
*
60-
* @test
61-
*/
58+
* it crops image in given width and height
59+
*
60+
* @test
61+
*/
6262
public function it_crops_image_in_given_width_and_height()
6363
{
6464
$this->newImage = $this->user->resizeImage(
@@ -95,10 +95,10 @@ public function it_crops_in_x_and_y_if_crop_is_set_to_array_of_coordinates()
9595
}
9696

9797
/**
98-
* it can override the crop x and y coordinates
99-
*
100-
* @test
101-
*/
98+
* it can override the crop x and y coordinates
99+
*
100+
* @test
101+
*/
102102
public function it_can_override_the_crop_x_and_y_coordinates()
103103
{
104104
$this->newImage = $this->user->cropTo(10, 0)->resizeImage(
@@ -115,10 +115,10 @@ public function it_can_override_the_crop_x_and_y_coordinates()
115115
}
116116

117117
/**
118-
* it do not resize if width and height are not provided
119-
*
120-
* @test
121-
*/
118+
* it do not resize if width and height are not provided
119+
*
120+
* @test
121+
*/
122122
public function it_do_not_resize_if_width_and_height_are_not_provided()
123123
{
124124
$this->newImage = $this->user->resizeImage($this->testImage, []);

0 commit comments

Comments
 (0)