@@ -77,33 +77,40 @@ public function test_has_transparency_no_image(): void {
7777 * @covers ::get_dominant_color
7878 */
7979 public function test_get_dominant_color_success (): void {
80- $ im = imagecreatetruecolor ( 1 , 1 );
80+ $ im = imagecreatetruecolor ( 1 , 1 );
8181 $ red = imagecolorallocate ( $ im , 255 , 0 , 0 );
8282 imagefill ( $ im , 0 , 0 , $ red );
8383
84- $ editor = new Dominant_Color_Image_Editor_GD ( null );
84+ $ editor = new Dominant_Color_Image_Editor_GD ( null );
8585 $ reflection = new ReflectionClass ( $ editor );
86- $ property = $ reflection ->getProperty ( 'image ' );
86+ $ property = $ reflection ->getProperty ( 'image ' );
8787 $ property ->setAccessible ( true );
8888 $ property ->setValue ( $ editor , $ im );
8989
9090 $ result = $ editor ->get_dominant_color ();
9191
9292 $ this ->assertIsArray ( $ result );
93- $ this ->assertSame ( array ( 'r ' => 255 , 'g ' => 0 , 'b ' => 0 ), $ result );
93+ $ this ->assertSame (
94+ array (
95+ 'r ' => 255 ,
96+ 'g ' => 0 ,
97+ 'b ' => 0 ,
98+ ),
99+ $ result
100+ );
94101 }
95102
96103 /**
97104 * @covers ::has_transparency
98105 */
99106 public function test_has_no_transparency (): void {
100- $ im = imagecreatetruecolor ( 1 , 1 );
107+ $ im = imagecreatetruecolor ( 1 , 1 );
101108 $ red = imagecolorallocate ( $ im , 255 , 0 , 0 );
102109 imagefill ( $ im , 0 , 0 , $ red );
103110
104- $ editor = new Dominant_Color_Image_Editor_GD ( null );
111+ $ editor = new Dominant_Color_Image_Editor_GD ( null );
105112 $ reflection = new ReflectionClass ( $ editor );
106- $ property = $ reflection ->getProperty ( 'image ' );
113+ $ property = $ reflection ->getProperty ( 'image ' );
107114 $ property ->setAccessible ( true );
108115 $ property ->setValue ( $ editor , $ im );
109116
@@ -116,13 +123,13 @@ public function test_has_no_transparency(): void {
116123 * @covers ::has_transparency
117124 */
118125 public function test_has_transparency_with_transparency (): void {
119- $ im = imagecreatetruecolor ( 1 , 1 );
126+ $ im = imagecreatetruecolor ( 1 , 1 );
120127 $ alpha_color = imagecolorallocatealpha ( $ im , 255 , 0 , 0 , 64 );
121128 imagefill ( $ im , 0 , 0 , $ alpha_color );
122129
123- $ editor = new Dominant_Color_Image_Editor_GD ( null );
130+ $ editor = new Dominant_Color_Image_Editor_GD ( null );
124131 $ reflection = new ReflectionClass ( $ editor );
125- $ property = $ reflection ->getProperty ( 'image ' );
132+ $ property = $ reflection ->getProperty ( 'image ' );
126133 $ property ->setAccessible ( true );
127134 $ property ->setValue ( $ editor , $ im );
128135
0 commit comments