@@ -80,28 +80,28 @@ public function test_should_retrieve_sizes_with_settings() {
8080 }
8181
8282 public function test_should_not_retrieve_sizes_with_zero_width_and_height_values () {
83- $ this ->wp ->addOption ( 'tinypng_sizes[0] ' , 'on ' );
84- $ this ->wp ->addOption ( 'tinypng_sizes[medium] ' , 'on ' );
85- $ this ->wp ->addOption ( 'tinypng_sizes[post-thumbnail] ' , 'on ' );
86- $ this ->wp ->addOption ( 'tinypng_sizes[zero-width] ' , 'off ' );
87- $ this ->wp ->addOption ( 'tinypng_sizes[zero-height] ' , 'off ' );
88- $ this ->wp ->addOption ( 'tinypng_sizes[zero-width-height] ' , 'off ' );
89-
90- $ this ->wp ->addImageSize ( 'zero-width ' , array ( 'width ' => 0 , 'height ' => 510 ) );
91- $ this ->wp ->addImageSize ( 'zero-height ' , array ( 'width ' => 825 , 'height ' => 0 ) );
92- $ this ->wp ->addImageSize ( 'zero-width-height ' , array ( 'width ' => 0 , 'height ' => 0 ) );
93-
94- $ this ->subject ->get_sizes ();
95- $ this ->assertEquals (array (
96- 0 => array ( 'width ' => null , 'height ' => null , 'tinify ' => true ),
97- 'thumbnail ' => array ( 'width ' => 150 , 'height ' => 150 , 'tinify ' => false ),
98- 'medium ' => array ( 'width ' => 300 , 'height ' => 300 , 'tinify ' => true ),
99- 'medium_large ' => array ( 'width ' => 768 , 'height ' => 0 , 'tinify ' => false ),
100- 'large ' => array ( 'width ' => 1024 , 'height ' => 1024 , 'tinify ' => false ),
101- 'zero-width ' => array ( 'width ' => 0 , 'height ' => 510 , 'tinify ' => false ),
102- 'zero-height ' => array ( 'width ' => 825 , 'height ' => 0 , 'tinify ' => false )
103- ), $ this ->subject ->get_sizes ());
104- }
83+ $ this ->wp ->addOption ( 'tinypng_sizes[0] ' , 'on ' );
84+ $ this ->wp ->addOption ( 'tinypng_sizes[medium] ' , 'on ' );
85+ $ this ->wp ->addOption ( 'tinypng_sizes[post-thumbnail] ' , 'on ' );
86+ $ this ->wp ->addOption ( 'tinypng_sizes[zero-width] ' , 'off ' );
87+ $ this ->wp ->addOption ( 'tinypng_sizes[zero-height] ' , 'off ' );
88+ $ this ->wp ->addOption ( 'tinypng_sizes[zero-width-height] ' , 'off ' );
89+
90+ $ this ->wp ->addImageSize ( 'zero-width ' , array ( 'width ' => 0 , 'height ' => 510 ) );
91+ $ this ->wp ->addImageSize ( 'zero-height ' , array ( 'width ' => 825 , 'height ' => 0 ) );
92+ $ this ->wp ->addImageSize ( 'zero-width-height ' , array ( 'width ' => 0 , 'height ' => 0 ) );
93+
94+ $ this ->subject ->get_sizes ();
95+ $ this ->assertEquals (array (
96+ 0 => array ( 'width ' => null , 'height ' => null , 'tinify ' => true ),
97+ 'thumbnail ' => array ( 'width ' => 150 , 'height ' => 150 , 'tinify ' => false ),
98+ 'medium ' => array ( 'width ' => 300 , 'height ' => 300 , 'tinify ' => true ),
99+ 'medium_large ' => array ( 'width ' => 768 , 'height ' => 0 , 'tinify ' => false ),
100+ 'large ' => array ( 'width ' => 1024 , 'height ' => 1024 , 'tinify ' => false ),
101+ 'zero-width ' => array ( 'width ' => 0 , 'height ' => 510 , 'tinify ' => false ),
102+ 'zero-height ' => array ( 'width ' => 825 , 'height ' => 0 , 'tinify ' => false )
103+ ), $ this ->subject ->get_sizes ());
104+ }
105105
106106 public function test_should_skip_dummy_size () {
107107 $ this ->wp ->addOption ( 'tinypng_sizes[tiny_dummy] ' , 'on ' );
0 commit comments