File tree Expand file tree Collapse file tree 1 file changed +0
-30
lines changed
plugins/dominant-color-images/tests Expand file tree Collapse file tree 1 file changed +0
-30
lines changed Original file line number Diff line number Diff line change @@ -168,34 +168,4 @@ public function test_has_transparency_with_transparency(): void {
168
168
169
169
$ this ->assertTrue ( $ result );
170
170
}
171
-
172
- /**
173
- * @covers ::has_transparency
174
- */
175
- public function test_has_transparency_no_alpha_channel_method (): void {
176
- // Mock the Imagick object to simulate when getImageAlphaChannel method doesn't exist.
177
- $ imagick_mock = $ this ->getMockBuilder ( Imagick::class )
178
- ->disableOriginalConstructor ()
179
- ->getMock ();
180
-
181
- $ imagick_mock ->method ( 'getImageWidth ' )->willReturn ( 1 );
182
- $ imagick_mock ->method ( 'getImageHeight ' )->willReturn ( 1 );
183
-
184
- $ pixel = $ this ->getMockBuilder ( ImagickPixel::class )
185
- ->disableOriginalConstructor ()
186
- ->getMock ();
187
- $ pixel ->method ( 'getColor ' )->willReturn ( array ( 'a ' => 0 ) );
188
-
189
- $ imagick_mock ->method ( 'getImagePixelColor ' )->willReturn ( $ pixel );
190
-
191
- $ editor = new Dominant_Color_Image_Editor_Imagick ( null );
192
- $ reflection = new ReflectionClass ( $ editor );
193
- $ property = $ reflection ->getProperty ( 'image ' );
194
- $ property ->setAccessible ( true );
195
- $ property ->setValue ( $ editor , $ imagick_mock );
196
-
197
- $ result = $ editor ->has_transparency ();
198
-
199
- $ this ->assertFalse ( $ result );
200
- }
201
171
}
You can’t perform that action at this time.
0 commit comments