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($this->header->getKeywordValue('BITPIX')), '16' ); $this->assertSame( trim($this->header->getKeywordValue('NAXIS')), '3' ); $this->assertSame( trim($this->header->getKeywordValue('STACKCNT')), '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); } */ }