public function testGetDuplicates() { $phraseFirstMock = $this->getMock('Magento\\Tools\\I18n\\Dictionary\\Phrase', [], [], '', false); $phraseFirstMock->expects($this->once())->method('getKey')->will($this->returnValue('key_1')); $phraseSecondMock = $this->getMock('Magento\\Tools\\I18n\\Dictionary\\Phrase', [], [], '', false); $phraseSecondMock->expects($this->once())->method('getKey')->will($this->returnValue('key_1')); $phraseThirdMock = $this->getMock('Magento\\Tools\\I18n\\Dictionary\\Phrase', [], [], '', false); $phraseThirdMock->expects($this->once())->method('getKey')->will($this->returnValue('key_3')); $this->_dictionary->addPhrase($phraseFirstMock); $this->_dictionary->addPhrase($phraseSecondMock); $this->_dictionary->addPhrase($phraseThirdMock); $this->assertEquals([[$phraseFirstMock, $phraseSecondMock]], $this->_dictionary->getDuplicates()); }