Test FitsHeader#keyword method
This commit is contained in:
parent
109ae71059
commit
da712b0e77
@ -13,7 +13,8 @@
|
|||||||
"phpunit/phpunit": "^11.3"
|
"phpunit/phpunit": "^11.3"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"run-pstan": "vendor/bin/phpstan analyze src/ --level 6"
|
"run-pstan": "vendor/bin/phpstan analyze src/ --level 6",
|
||||||
|
"run-tests": "vendor/bin/phpunit tests/ --display-warnings"
|
||||||
},
|
},
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
|
@ -30,5 +30,30 @@ final class FitsHeaderTest extends TestCase
|
|||||||
'86'
|
'86'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function testKeyword(): void
|
||||||
|
{
|
||||||
|
$keyword = $this->header->keyword('NAXIS1');
|
||||||
|
|
||||||
|
// Probably useless... (covered by PHPStan)
|
||||||
|
$this->assertInstanceOf(Dumbastro\FitsPhp\Keyword::class, $keyword);
|
||||||
|
|
||||||
|
$this->assertEquals($keyword->value, 2448);
|
||||||
|
|
||||||
|
$keyword = $this->header->keyword('EQUINOX');
|
||||||
|
|
||||||
|
$this->assertEquals(trim($keyword->value), '2000.');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @todo This fails for COMMENT keywords
|
||||||
|
public function testToString(): void
|
||||||
|
{
|
||||||
|
$headerBlock = $this->fits->headerBlock;
|
||||||
|
$headerString = $this->header->toString();
|
||||||
|
|
||||||
|
$this->assertEquals($headerBlock, $headerString);
|
||||||
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user