public function testGetFormatter() { $testTypeFormatter = new \stdClass(); $this->setContainerMock('exist_formatter', $testTypeFormatter); $this->assertEquals($testTypeFormatter, $this->formatter->getFormatterByAlias('exist_alias')); //test already created formatter will be stored in provider $this->assertEquals($testTypeFormatter, $this->formatter->getFormatterByAlias('exist_alias')); $this->setExpectedException('Oro\\Bundle\\ImportExportBundle\\Exception\\InvalidArgumentException', 'The formatter is not found by "non_exist_alias" alias.'); $this->formatter->getFormatterByAlias('non_exist_alias'); }
/** * @expectedException InvalidArgumentException * @expectedExceptionMessage The formatter is not found by "non_exist_alias" alias. */ public function testGetFormatterByAliasWithNotExistsAlias() { $this->formatter->getFormatterByAlias('non_exist_alias'); }