Add some tests + phpdoc
This commit is contained in:
24
tests/FitsHeaderTest.php
Normal file
24
tests/FitsHeaderTest.php
Normal 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'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
16
tests/FitsTest.php
Normal file
16
tests/FitsTest.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
final class FitsTest extends TestCase
|
||||
{
|
||||
public function testValidatesFits(): void
|
||||
{
|
||||
$fits = new Dumbastro\FitsPhp\Fits(__DIR__ . '/test_orion.fit');
|
||||
|
||||
$this->assertTrue($fits->validate());
|
||||
}
|
||||
}
|
||||
|
||||
BIN
tests/test_orion.fit
Normal file
BIN
tests/test_orion.fit
Normal file
Binary file not shown.
Reference in New Issue
Block a user