2
2
3
3
include __DIR__ .'/../lib/ImageResize.php ' ;
4
4
5
- use \Eventviva \ImageResize ;
6
- use \Eventviva \ImageResizeException ;
5
+ use \Gumlet \ImageResize ;
6
+ use \Gumlet \ImageResizeException ;
7
7
8
8
if (version_compare (PHP_VERSION , '7.0.0 ' ) >= 0 && !class_exists ('PHPUnit_Framework_TestCase ' )) {
9
9
class_alias ('PHPUnit\Framework\TestCase ' , 'PHPUnit_Framework_TestCase ' );
@@ -32,7 +32,7 @@ public function testLoadGif()
32
32
$ resize = new ImageResize ($ image );
33
33
34
34
$ this ->assertEquals (IMAGETYPE_GIF , $ resize ->source_type );
35
- $ this ->assertInstanceOf ('\Eventviva \ImageResize ' , $ resize );
35
+ $ this ->assertInstanceOf ('\Gumlet \ImageResize ' , $ resize );
36
36
}
37
37
38
38
public function testLoadJpg ()
@@ -41,7 +41,7 @@ public function testLoadJpg()
41
41
$ resize = new ImageResize ($ image );
42
42
43
43
$ this ->assertEquals (IMAGETYPE_JPEG , $ resize ->source_type );
44
- $ this ->assertInstanceOf ('\Eventviva \ImageResize ' , $ resize );
44
+ $ this ->assertInstanceOf ('\Gumlet \ImageResize ' , $ resize );
45
45
}
46
46
47
47
public function testLoadIgnoreXmpExifJpg ()
@@ -50,7 +50,7 @@ public function testLoadIgnoreXmpExifJpg()
50
50
$ resize = new ImageResize ($ image );
51
51
52
52
$ this ->assertEquals (IMAGETYPE_JPEG , $ resize ->source_type );
53
- $ this ->assertInstanceOf ('\Eventviva \ImageResize ' , $ resize );
53
+ $ this ->assertInstanceOf ('\Gumlet \ImageResize ' , $ resize );
54
54
}
55
55
56
56
public function testLoadPng ()
@@ -59,23 +59,23 @@ public function testLoadPng()
59
59
$ resize = new ImageResize ($ image );
60
60
61
61
$ this ->assertEquals (IMAGETYPE_PNG , $ resize ->source_type );
62
- $ this ->assertInstanceOf ('\Eventviva \ImageResize ' , $ resize );
62
+ $ this ->assertInstanceOf ('\Gumlet \ImageResize ' , $ resize );
63
63
}
64
64
65
65
public function testLoadString ()
66
66
{
67
67
$ resize = ImageResize::createFromString (base64_decode ($ this ->image_string ));
68
68
69
69
$ this ->assertEquals (IMAGETYPE_GIF , $ resize ->source_type );
70
- $ this ->assertInstanceOf ('\Eventviva \ImageResize ' , $ resize );
70
+ $ this ->assertInstanceOf ('\Gumlet \ImageResize ' , $ resize );
71
71
}
72
72
73
73
/**
74
74
* Bad load tests
75
75
*/
76
76
77
77
/**
78
- * @expectedException \Eventviva \ImageResizeException
78
+ * @expectedException \Gumlet \ImageResizeException
79
79
* @expectedExceptionMessage File does not exist
80
80
*/
81
81
public function testLoadNoFile ()
@@ -84,7 +84,7 @@ public function testLoadNoFile()
84
84
}
85
85
86
86
/**
87
- * @expectedException \Eventviva \ImageResizeException
87
+ * @expectedException \Gumlet \ImageResizeException
88
88
* @expectedExceptionMessage Unsupported file type
89
89
*/
90
90
public function testLoadUnsupportedFile ()
@@ -93,7 +93,7 @@ public function testLoadUnsupportedFile()
93
93
}
94
94
95
95
/**
96
- * @expectedException \Eventviva \ImageResizeException
96
+ * @expectedException \Gumlet \ImageResizeException
97
97
* @expectedExceptionMessage image_data must not be empty
98
98
*/
99
99
public function testLoadUnsupportedFileString ()
@@ -102,7 +102,7 @@ public function testLoadUnsupportedFileString()
102
102
}
103
103
104
104
/**
105
- * @expectedException \Eventviva \ImageResizeException
105
+ * @expectedException \Gumlet \ImageResizeException
106
106
* @expectedExceptionMessage Unsupported image type
107
107
*/
108
108
public function testLoadUnsupportedImage ()
@@ -117,7 +117,7 @@ public function testLoadUnsupportedImage()
117
117
}
118
118
119
119
/**
120
- * @expectedException \Eventviva \ImageResizeException
120
+ * @expectedException \Gumlet \ImageResizeException
121
121
* @expectedExceptionMessage Unsupported image type
122
122
*/
123
123
public function testInvalidString ()
@@ -284,7 +284,7 @@ public function testCropPosition()
284
284
285
285
$ resize ->crop (50 , 50 , false , $ resize ::CROPRIGHT );
286
286
287
- $ reflection_class = new ReflectionClass ('\Eventviva \ImageResize ' );
287
+ $ reflection_class = new ReflectionClass ('\Gumlet \ImageResize ' );
288
288
$ source_x = $ reflection_class ->getProperty ('source_x ' );
289
289
$ source_x ->setAccessible (true );
290
290
@@ -478,15 +478,15 @@ public function testExceptionEmpty()
478
478
$ e = new ImageResizeException ();
479
479
480
480
$ this ->assertEquals ("" , $ e ->getMessage ());
481
- $ this ->assertInstanceOf ('\Eventviva \ImageResizeException ' , $ e );
481
+ $ this ->assertInstanceOf ('\Gumlet \ImageResizeException ' , $ e );
482
482
}
483
483
484
484
public function testExceptionMessage ()
485
485
{
486
486
$ e = new ImageResizeException ("General error " );
487
487
488
488
$ this ->assertEquals ("General error " , $ e ->getMessage ());
489
- $ this ->assertInstanceOf ('\Eventviva \ImageResizeException ' , $ e );
489
+ $ this ->assertInstanceOf ('\Gumlet \ImageResizeException ' , $ e );
490
490
}
491
491
492
492
public function testExceptionExtending ()
@@ -502,7 +502,7 @@ public function testExceptionThrown()
502
502
throw new ImageResizeException ("General error " );
503
503
} catch (\Exception $ e ) {
504
504
$ this ->assertEquals ("General error " , $ e ->getMessage ());
505
- $ this ->assertInstanceOf ('\Eventviva \ImageResizeException ' , $ e );
505
+ $ this ->assertInstanceOf ('\Gumlet \ImageResizeException ' , $ e );
506
506
return ;
507
507
}
508
508
$ this ->fail ();
0 commit comments