Separate multi-block comments; update README

This commit is contained in:
2024-12-24 15:01:55 +01:00
parent 623b939df1
commit 109ae71059
5 changed files with 65 additions and 9 deletions

View File

@@ -6,19 +6,29 @@ use PHPUnit\Framework\TestCase;
final class FitsHeaderTest extends TestCase
{
public function testKeywordValue(): void
private Dumbastro\FitsPhp\Fits $fits;
private Dumbastro\FitsPhp\FitsHeader $header;
protected function setUp(): void
{
$fits = new Dumbastro\FitsPhp\Fits(__DIR__ . '/test_orion.fit');
$header = new Dumbastro\FitsPhp\FitsHeader($fits->headerBlock);
$this->fits = new Dumbastro\FitsPhp\Fits(__DIR__ . '/test_orion.fit');
$this->header = new Dumbastro\FitsPhp\FitsHeader($this->fits->headerBlock);
}
public function testKeywordValues(): void
{
$this->assertSame(
trim($header->getKeywordValue('BITPIX')),
trim($this->header->getKeywordValue('BITPIX')),
'16'
);
$this->assertSame(
trim($header->getKeywordValue('NAXIS')),
trim($this->header->getKeywordValue('NAXIS')),
'3'
);
$this->assertSame(
trim($this->header->getKeywordValue('STACKCNT')),
'86'
);
}
}