Skip to content

Commit

Permalink
Tweak test
Browse files Browse the repository at this point in the history
  • Loading branch information
theseer committed Jul 28, 2023
1 parent a1db358 commit c60c324
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/viewmodel/ViewModelRendererTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1091,7 +1091,7 @@ public function document(): Document {
#[DataProvider('attributeViewModelProvider')]
public function testAttributesGetAppliedFromViewModelProperties(object $model, string $value): void {
$dom = new DOMDocument();
$dom->loadXML('<root property="document" attr="default" data-attr="default" />');
$dom->loadXML('<root property="document" attr="default" ignore="stays" data-attr="default" />');

$renderer = new ViewModelRenderer();
$renderer->render(
Expand All @@ -1100,7 +1100,7 @@ public function testAttributesGetAppliedFromViewModelProperties(object $model, s
);

$expected = new DOMDocument();
$expected->loadXML('<root property="document" attr="'.$value.'" data-attr="'.$value.'" />');
$expected->loadXML('<root property="document" attr="'.$value.'" ignore="stays" data-attr="'.$value.'" />');

$this->assertResultMatches($expected->documentElement, $dom->documentElement);
}
Expand All @@ -1113,6 +1113,8 @@ public function document(): object {
return new class {
public string $attr='changed';
public string $dataAttr = 'changed';

public bool $ignore = true;
};
}
},
Expand Down

0 comments on commit c60c324

Please sign in to comment.