Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions tests/Cucumber/ParserResultDumper.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,14 @@ private function recursiveDump(mixed $value): mixed
// we know that the FeatureNode and the objects it contains do not contain any recursive references.
$values = [];
$reflection = new ReflectionClass($value);
foreach ($reflection->getProperties() as $property) {
$values[$property->getName()] = match ($property->isInitialized($value)) {
true => $this->recursiveDump($property->getValue($value)),
false => '**NOT INITIALIZED**',
};
}
do {
foreach ($reflection->getProperties() as $property) {
$values[$property->getName()] = match ($property->isInitialized($value)) {
true => $this->recursiveDump($property->getValue($value)),
false => '**NOT INITIALIZED**',
};
}
} while ($reflection = $reflection->getParentClass());

return [$value::class => $values];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ Behat\Gherkin\Node\FeatureNode:
Behat\Gherkin\Node\ExampleTableNode:
keyword: Examples
tags: []
maxLineLength:
- 9
table:
17:
- color
18:
- "\_ \tred\_ \t"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm already aware of the padding variation - there's a skipped cucumber example for it but we didn't have an issue so have opened #395

examples: '**NOT INITIALIZED**'
title: test
tags: []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ Behat\Gherkin\Node\FeatureNode:
Behat\Gherkin\Node\ExampleTableNode:
keyword: Examples
tags: []
maxLineLength:
- 7
table:
17:
- color
18:
- "\_ \tred\_"
examples: '**NOT INITIALIZED**'
title: test
tags: []
Expand Down