@@ -77,6 +77,9 @@ |
||
| 77 | 77 | return $scenarios; |
| 78 | 78 | } |
| 79 | 79 | |
| 80 | + /** |
|
| 81 | + * @param \Closure $callable |
|
| 82 | + */ |
|
| 80 | 83 | protected function buildCallee($feature, $scenario, $callable) |
| 81 | 84 | { |
| 82 | 85 | $description = sprintf('%s:%s', $feature->getFile(), $scenario->getLine()); |
@@ -4,11 +4,17 @@ discard block |
||
| 4 | 4 | |
| 5 | 5 | class TextFormater |
| 6 | 6 | { |
| 7 | + /** |
|
| 8 | + * @param string $str |
|
| 9 | + */ |
|
| 7 | 10 | public function toCamelCase($str) |
| 8 | 11 | { |
| 9 | 12 | return preg_replace('/ /', '', ucwords($str)); |
| 10 | 13 | } |
| 11 | 14 | |
| 15 | + /** |
|
| 16 | + * @param string $str |
|
| 17 | + */ |
|
| 12 | 18 | public function toUnderscoreCase($str) |
| 13 | 19 | { |
| 14 | 20 | $str = strtolower(preg_replace("[A-Z]", "_\$1", $str)); |
@@ -77,6 +83,9 @@ discard block |
||
| 77 | 83 | return $this->goDeeper($array, 0); |
| 78 | 84 | } |
| 79 | 85 | |
| 86 | + /** |
|
| 87 | + * @param integer $deep |
|
| 88 | + */ |
|
| 80 | 89 | protected function goDeeper(array $array, $deep) |
| 81 | 90 | { |
| 82 | 91 | $deep++; |
@@ -89,6 +98,9 @@ discard block |
||
| 89 | 98 | return $deep; |
| 90 | 99 | } |
| 91 | 100 | |
| 101 | + /** |
|
| 102 | + * @param string $input |
|
| 103 | + */ |
|
| 92 | 104 | protected function mbStrPad($input, $pad_length, $pad_string = ' ', $pad_type = STR_PAD_RIGHT) |
| 93 | 105 | { |
| 94 | 106 | $diff = strlen($input) - mb_strlen($input, 'UTF8'); |
@@ -3,10 +3,6 @@ |
||
| 3 | 3 | namespace Knp\FriendlyContexts\Context; |
| 4 | 4 | |
| 5 | 5 | use Behat\MinkExtension\Context\MinkContext as BaseMinkContext; |
| 6 | -use Behat\Mink\Element\TraversableElement; |
|
| 7 | -use Behat\Mink\Exception\ElementNotFoundException; |
|
| 8 | -use Knp\FriendlyContexts\Utils\Asserter; |
|
| 9 | -use Knp\FriendlyContexts\Utils\TextFormater; |
|
| 10 | 6 | |
| 11 | 7 | class MinkContext extends BaseMinkContext |
| 12 | 8 | { |
@@ -85,6 +85,9 @@ |
||
| 85 | 85 | return $this->assert($expected !== $real, $message); |
| 86 | 86 | } |
| 87 | 87 | |
| 88 | + /** |
|
| 89 | + * @param boolean $result |
|
| 90 | + */ |
|
| 88 | 91 | public function assert($result, $message = "Assert failure") |
| 89 | 92 | { |
| 90 | 93 | if (false === $result) { |