/** * Add phrase to pack container * * @param Phrase $phrase * @return void */ public function addPhrase(Phrase $phrase) { $this->_phrases[] = $phrase; $this->_phrasesByKey[$phrase->getKey()][] = $phrase; }
public function testGetKey() { $phrase = new Phrase('phrase', 'translation', 'context_type', 'context_value1'); $this->assertEquals('phrase::context_type', $phrase->getKey()); }