/** * @expectedException \InvalidArgumentException * @expectedExceptionMessage Argument interpreter named 'one' has already been defined * */ public function testAddInterpreterException() { $newInterpreter = $this->getMock('Magento\\Framework\\Data\\Argument\\InterpreterInterface'); $this->_model->addInterpreter('one', $newInterpreter); }