public function testSetAndRetrieveSpellcheckTextVisitor() { $config = new AfsHelperConfiguration(); $visitor = new SpellcheckTextVisitorMock(); $config->set_spellcheck_text_visitor($visitor); $visitor = $config->get_spellcheck_text_visitor(); $this->assertNotNull($visitor); $text = new AfsSpellcheckText(json_decode('{"text": "bar"}')); $this->assertEquals('ARGbarARG', $visitor->visit_AfsSpellcheckText($text)->raw); }