/** * @expectedException \Snowcap\Emarsys\Exception\ClientException * @expectedExceptionMessage Unrecognized choice "choice-name" for field "myCustomField" */ public function testItThrowsAnExceptionIfChoiceDoesNotExist() { $fieldName = 'myCustomField'; $mapping = array($fieldName => array()); $this->client->addChoicesMapping($mapping); $this->client->getChoiceId($fieldName, 'choice-name'); }