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

33
tests/ImageBlobTest.php Normal file
View File

@@ -0,0 +1,33 @@
<?php
declare(strict_types=1);
use PHPUnit\Framework\TestCase;
final class ImageBlobTest extends TestCase
{
private Dumbastro\FitsPhp\ImageBlob $imageBlob;
private Dumbastro\FitsPhp\Fits $fits;
private Dumbastro\FitsPhp\FitsHeader $header;
protected function setUp(): void
{
$this->fits = new Dumbastro\FitsPhp\Fits(__DIR__ . '/test_orion.fit');
$this->header = $this->fits->header();
$blob = $this->fits->imageBlob;
$this->imageBlob = new Dumbastro\FitsPhp\ImageBlob($this->header, $blob);
}
public function testBitpixValue(): void
{
$this->assertSame($this->imageBlob->bitpix->value, 16);
}
public function testDataBitsLength(): void
{
$this->assertSame($this->imageBlob->dataBits, 16*2448*1669);
}
}