public function testSingleton() { $formatter = new HtmlFormatter(); $language = new MockGreedyLanguage(['rules' => ['keyword' => new Rule(new SubStringMatcher('if'))]]); $this->assertEquals($formatter->format($language->parse('if test')), KeyLighter::get()->highlight('if test', $language, $formatter)); }
public function testReturnFQNWithEmbedded() { $language = new MockGreedyLanguage(['embedded' => [new MockGreedyLanguage([])]]); $this->assertSame('mock + mock', $language->getFQN()); }