Skip to content

Commit 7331f77

Browse files
committed
:octocat: phan happy
1 parent 8b544fe commit 7331f77

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

tests/ImagetilerTest.php

+7-8
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@
1010

1111
namespace chillerlan\ImagetilerTest;
1212

13-
use chillerlan\Imagetiler\Imagetiler;
14-
use chillerlan\Imagetiler\ImagetilerOptions;
13+
use chillerlan\Imagetiler\{Imagetiler, ImagetilerOptions};
1514
use PHPUnit\Framework\TestCase;
1615
use ReflectionClass, ReflectionMethod;
1716

@@ -23,21 +22,21 @@ protected function setUp():void{
2322
$this->reflection = new ReflectionClass(Imagetiler::class);
2423
}
2524

26-
public function testGetSize(){
27-
25+
public function testGetSize():void{
26+
$min = 0;
2827
$max = 22;
2928

3029
$options = new ImagetilerOptions([
31-
'zoom_min' => 0,
30+
'zoom_min' => $min,
3231
'zoom_max' => $max,
3332
'zoom_normalize' => 4,
3433
]);
3534

3635
$tiler = new Imagetiler($options);
3736

38-
for($z = 0; $z <= $max; $z++){
37+
for($z = $min; $z <= $max; $z++){
3938
$v = $this->getMethod('getSize')->invokeArgs($tiler, [4096, 2048, $z]);
40-
39+
/** @phan-suppress-next-line PhanPowerOfZero */
4140
$expected = 2 ** $z * 256;
4241

4342
$this->assertSame($expected, $v[0]);
@@ -51,7 +50,7 @@ public function testGetSize(){
5150
*
5251
* @return \ReflectionMethod
5352
*/
54-
protected function getMethod(string $method):ReflectionMethod {
53+
protected function getMethod(string $method):ReflectionMethod{
5554
$method = $this->reflection->getMethod($method);
5655
$method->setAccessible(true);
5756

0 commit comments

Comments
 (0)