Skip to content

Commit

Permalink
remove default value on boolean node, add new dataset on ExtractorTest
Browse files Browse the repository at this point in the history
  • Loading branch information
JoMessina committed May 27, 2024
1 parent 320bdd5 commit de36c81
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
4 changes: 0 additions & 4 deletions src/Builder/Capacity/Lookup/All.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ final class All implements Builder
private ?Node\Expr $code = null;
private string $type = '';

public function __construct()
{
}

public function withEndpoint(Node\Expr|Node\Identifier $endpoint): self
{
$this->endpoint = $endpoint;
Expand Down
1 change: 0 additions & 1 deletion src/Configuration/Extractor.php
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,6 @@ public function getConfigTreeBuilder(): Config\Definition\Builder\TreeBuilder
->end()
->end()
->booleanNode('with_enriched_attributes')
->defaultFalse()
->validate()
->ifTrue(isExpression())
->then(asExpression())
Expand Down
14 changes: 14 additions & 0 deletions tests/functional/Configuration/ExtractorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,20 @@ public static function validDataProvider(): iterable
'search' => [],
],
];
yield [
'config' => [
'method' => 'all',
'type' => 'category',
'search' => [],
'with_enriched_attributes' => true,
],
'expected' => [
'method' => 'all',
'type' => 'category',
'search' => [],
'with_enriched_attributes' => true,
],
];
}

#[\PHPUnit\Framework\Attributes\DataProvider('validDataProvider')]
Expand Down

0 comments on commit de36c81

Please sign in to comment.