Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'release/2.2.5'

  • Loading branch information...
commit 9581638be7c6fdc9a8806c00a77fc7ba0f2fc3f6 2 parents 1887a8c + 546b468
@everzet everzet authored
View
6 CHANGES.md
@@ -1,3 +1,9 @@
+2.2.5 / 2012-09-26
+==================
+
+ * Fixed issue with loading empty features
+ * Synced Gherkin i18n
+
2.2.4 / 2012-08-03
==================
View
8 bin/update_i18n
@@ -1,12 +1,8 @@
#!/usr/bin/env php
<?php
-require_once __DIR__.'/../vendor/autoload.php';
-
-use Symfony\Component\Yaml\Yaml;
-
-$yaml = file_get_contents('https://raw.github.com/cucumber/gherkin/master/lib/gherkin/i18n.yml');
-$array = Yaml::parse($yaml);
+$json = file_get_contents('https://raw.github.com/cucumber/gherkin/master/lib/gherkin/i18n.json');
+$array = json_decode($json, true);
foreach ($array as $lang => $keywords) {
foreach (array('given', 'when', 'then', 'and', 'but') as $type) {
View
4 i18n.php
@@ -36,8 +36,8 @@
'feature' => 'Fungsi',
'background' => 'Latar Belakang',
'scenario' => 'Senario',
- 'scenario_outline' => 'Menggariskan Senario',
- 'examples' => 'Contoh',
+ 'scenario_outline' => 'Menggariskan Senario ',
+ 'examples' => 'Contoh ',
'given' => 'Bagi',
'when' => 'Apabila',
'then' => 'Kemudian',
View
4 src/Behat/Gherkin/Lexer.php
@@ -463,9 +463,7 @@ protected function scanTags()
if (isset($line[0]) && '@' === $line[0]) {
$token = $this->takeToken('Tag');
$tags = explode('@', mb_substr($line, 1));
- $tags = array_map(function($tag){
- return trim($tag);
- }, $tags);
+ $tags = array_map('trim', $tags);
$token->tags = $tags;
$this->consumeLine();
View
5 src/Behat/Gherkin/Loader/GherkinFileLoader.php
@@ -73,15 +73,14 @@ public function load($path)
if ($this->cache) {
if ($this->cache->isFresh($path, filemtime($path))) {
$feature = $this->cache->read($path);
- } else {
- $feature = $this->parseFeature($path);
+ } elseif (null !== $feature = $this->parseFeature($path)) {
$this->cache->write($path, $feature);
}
} else {
$feature = $this->parseFeature($path);
}
- return array($feature);
+ return null !== $feature ? array($feature) : array();
}
/**
Please sign in to comment.
Something went wrong with that request. Please try again.