assertIsArray($semantics->getAnnotations()); $this->assertCount(0, $semantics->getAnnotations()); } public function testAnnotation(): void { $semantics = new Semantics(); $this->assertIsArray($semantics->getAnnotations()); $this->assertCount(0, $semantics->getAnnotations()); $this->assertInstanceOf(Semantics::class, $semantics->addAnnotation('encoding', 'content')); $this->assertEquals(['encoding' => 'content'], $semantics->getAnnotations()); $this->assertCount(1, $semantics->getAnnotations()); $this->assertEquals('content', $semantics->getAnnotation('encoding')); $this->assertNull($semantics->getAnnotation('notexisting')); } }