Skip to content

Commit

Permalink
Change test values
Browse files Browse the repository at this point in the history
  • Loading branch information
olivervogel committed Sep 21, 2024
1 parent a3b5359 commit cb464e1
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions tests/Unit/Drivers/Imagick/FontProcessorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ public function testBoxSizeTtf(): void
$processor = new FontProcessor();
$size = $processor->boxSize('ABC', $this->testFont());
$this->assertInstanceOf(SizeInterface::class, $size);
$this->assertEquals(16, $size->width());
$this->assertEquals(7, $size->height());
$this->assertEquals(36, $size->width());
$this->assertEquals(15, $size->height());
}

public function testNativeFontSize(): void
Expand All @@ -46,25 +46,26 @@ public function testTypographicalSize(): void
{
$processor = new FontProcessor();
$result = $processor->typographicalSize($this->testFont());
$this->assertEquals(7, $result);
$this->assertEquals(15, $result);
}

public function testCapHeight(): void
{
$processor = new FontProcessor();
$result = $processor->capHeight($this->testFont());
$this->assertEquals(7, $result);
$this->assertEquals(15, $result);
}

public function testLeading(): void
{
$processor = new FontProcessor();
$result = $processor->leading($this->testFont());
$this->assertEquals(9, $result);
$this->assertEquals(19, $result);
}

private function testFont(): Font
{
return new Font($this->getTestResourcePath('test.ttf'));
return (new Font($this->getTestResourcePath('test.ttf')))
->setSize(26);
}
}

0 comments on commit cb464e1

Please sign in to comment.