public function testScore() { $snippet = $this->snippetFromMagicMethod(Entity::class, 'score'); $snippet->addLocal('text', $this->entity); $res = $snippet->invoke(); $this->assertEquals($this->entityData['score'], $res->output()); }