forked from tempestphp/tempest-framework
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: view component attribute fixes (tempestphp#459)
- Loading branch information
Showing
16 changed files
with
154 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
tests/Fixtures/Views/view-component-attribute-without-this-a.view.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<x-component name="x-view-component-attribute-without-this-a"> | ||
<?= $var ?? 'nothing' ?> | ||
</x-component> |
1 change: 1 addition & 0 deletions
1
tests/Fixtures/Views/view-component-attribute-without-this-b.view.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<x-view-component-attribute-without-this-a var="fromString" /> |
3 changes: 3 additions & 0 deletions
3
tests/Fixtures/Views/view-component-with-camelcase-attribute-a.view.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<x-component name="x-view-component-with-camelcase-attribute-a"> | ||
<?= $metaType ?? 'nothing' ?> | ||
</x-component> |
2 changes: 2 additions & 0 deletions
2
tests/Fixtures/Views/view-component-with-camelcase-attribute-b.view.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<x-view-component-with-camelcase-attribute-a meta-type="test" /> | ||
<x-view-component-with-camelcase-attribute-a meta_type="test" /> |
9 changes: 9 additions & 0 deletions
9
tests/Fixtures/Views/view-component-with-non-self-closing-slot-a.view.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<x-component name="x-view-component-with-non-self-closing-slot-a"> | ||
A: <x-slot name="other"/> | ||
B: <x-slot name="other" /> | ||
C: <x-slot name="other"></x-slot> | ||
A: <x-slot/> | ||
B: <x-slot /> | ||
C: <x-slot></x-slot> | ||
</x-component> |
4 changes: 4 additions & 0 deletions
4
tests/Fixtures/Views/view-component-with-non-self-closing-slot-b.view.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<x-view-component-with-non-self-closing-slot-a> | ||
main slot | ||
<x-slot name="other">other slot</x-slot> | ||
</x-view-component-with-non-self-closing-slot-a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<x-component name="x-view-defined-local-vars-a"> | ||
<?= $this->var ?? 'nothing' ?> | ||
</x-component> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?php | ||
$localVariable = 'fromPHP'; | ||
?> | ||
|
||
<x-view-defined-local-vars-a :var="$localVariable"></x-view-defined-local-vars-a> | ||
<x-view-defined-local-vars-a var="fromString"></x-view-defined-local-vars-a> | ||
<x-view-defined-local-vars-a/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters