Skip to content

Commit 6f2ab79

Browse files
committed
Move grabService method to Container module
1 parent 14e3429 commit 6f2ab79

File tree

2 files changed

+15
-14
lines changed

2 files changed

+15
-14
lines changed

src/Module/Container.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,4 +108,19 @@ public function createContainer(array $configFiles = null)
108108

109109
return $this->container;
110110
}
111+
112+
/**
113+
* @param string $service
114+
*
115+
* @return object
116+
*/
117+
public function grabService($service)
118+
{
119+
try {
120+
return call_user_func($this->containerAccessor)->getByType($service);
121+
} catch (MissingServiceException $e) {
122+
$this->fail($e->getMessage());
123+
}
124+
}
125+
111126
}

src/Module/Nette.php

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -89,20 +89,6 @@ public function _after(TestInterface $test)
8989
$_COOKIE = [];
9090
}
9191

92-
/**
93-
* @param string $service
94-
*
95-
* @return object
96-
*/
97-
public function grabService($service)
98-
{
99-
try {
100-
return call_user_func($this->containerAccessor)->getByType($service);
101-
} catch (MissingServiceException $e) {
102-
$this->fail($e->getMessage());
103-
}
104-
}
105-
10692
public function seeRedirectTo($url)
10793
{
10894
if ($this->config['followRedirects']) {

0 commit comments

Comments
 (0)