Add some tests + phpdoc

This commit is contained in:
2024-12-23 22:19:37 +01:00
parent 3996272cec
commit 623b939df1
9 changed files with 71 additions and 5 deletions

24
tests/FitsHeaderTest.php Normal file
View File

@@ -0,0 +1,24 @@
<?php
declare(strict_types=1);
use PHPUnit\Framework\TestCase;
final class FitsHeaderTest extends TestCase
{
public function testKeywordValue(): void
{
$fits = new Dumbastro\FitsPhp\Fits(__DIR__ . '/test_orion.fit');
$header = new Dumbastro\FitsPhp\FitsHeader($fits->headerBlock);
$this->assertSame(
trim($header->getKeywordValue('BITPIX')),
'16'
);
$this->assertSame(
trim($header->getKeywordValue('NAXIS')),
'3'
);
}
}