public function getResource($key) { $resources = $this->getResources(); if (!isset($resources[$key])) { throw new ResourceNotFoundException("Resource '{$key}' not found in stack '{$this->getName()}'"); } return $resources[$key]; }
public function testResourceThatDoesntExist() { $this->setExpectedException('Exception', "Resource 'DoesNotExist' not found in stack 'test-stack1'"); $this->stack->getResource('DoesNotExist'); }