public function getTag($key) { $tags = $this->getTags(); if (!isset($tags[$key])) { throw new TagNotFoundException("Tag '{$key}' not found in stack '{$this->getName()}'"); } return $tags[$key]; }
public function testTagThatDoesntExist() { $this->setExpectedException('Exception', "Tag 'DoesNotExist' not found in stack 'test-stack1'"); $this->stack->getTag('DoesNotExist'); }