We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 00156b3 commit e778004Copy full SHA for e778004
src/Codeception/Module/Symfony.php
@@ -1004,6 +1004,29 @@ public function dontSeeAuthentication($remembered = true)
1004
);
1005
}
1006
1007
+ /**
1008
+ * Grabs a Symfony parameter
1009
+ *
1010
+ * ```php
1011
+ * <?php
1012
+ * $I->grabParameter('app.business_name');
1013
+ * ```
1014
1015
+ * @param string $name
1016
+ * @return mixed|null
1017
+ */
1018
+ public function grabParameter($name)
1019
+ {
1020
+ $container = $this->_getContainer();
1021
+
1022
+ if (!$container->has('parameter_bag')) {
1023
+ $this->fail("Symfony container doesn't have 'parameter_bag' service");
1024
+ return null;
1025
+ }
1026
+ $parameterBag = $this->grabService('parameter_bag');
1027
+ return $parameterBag->get($name);
1028
1029
1030
/**
1031
* Checks that current page matches action
1032
*
0 commit comments