private function getConfig() { $configPath = $this->project->getComposeConfigPath(); return (new Parser())->parse(file_get_contents($configPath)); }
function it_throws_an_exception_when_not_in_service(Project $project) { $project->getCurrentRelativePath()->willReturn(''); $project->getComposeConfigPath()->willReturn('spec/fixtures/docker-compose-nodefault.yml'); $this->shouldThrow('Dock\\Docker\\Compose\\NotWithinServiceException')->during('getCurrentService'); }