test: add View.Make/First render coverage for framework#1561 - #151
Open
goravel-coder wants to merge 1 commit into
Open
goravel-coder wants to merge 1 commit into
goravel-coder wants to merge 1 commit into
Conversation
hwbrzzl
force-pushed
the
bowen/test-pr-1561-view-render
branch
2 times, most recently
from
September 28, 2026 02:02
bf62a50 to
9730836
Compare
hwbrzzl
force-pushed
the
bowen/test-pr-1561-view-render
branch
from
September 28, 2026 02:03
9730836 to
c597b17
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ViewTestSuitenow locks in rendering a view to a string outside an HTTP request:Make(...).Render()matches the driver's response body byte-for-byte for the same view, and resolves app views, package views registered withLoadViewsFrom(), and nested partials/layouts.View.Firstis covered end to end through the newdefine_only.tmplfixture — it skips missing and existing-but-non-renderable candidates, returns the first renderable one, and reportsViewNoneExistwhen none qualify;Template.With/Name/Data, struct and pointer-to-struct data, and theViewTemplateNotExist/ViewInvalidDataerrors are asserted.github.com/goravel/frameworkto a temporary fork build of feat: [#773] add View.Make to render a template to a string framework#1561 so the new tests compile before that PR merges.Closes https://github.com/goravel/goravel/issues/1561
Why
goravel/framework#1561 generalizes the view API so a template can be built and rendered outside an HTTP response:
View.Make/View.Firstreturn aTemplateexposingRender,With,Name, andData. This branch adds the missing example-level integration coverage for that contract, exercising it through the publicfacades.View()facade under both the gin and fiber drivers rather than reaching into framework internals.go.modcurrently carries a temporaryreplace github.com/goravel/framework => github.com/darakanoit/framework v1.18.1-0.20260927233735-13001ebed1a1(plus the indirect dependency bumpsgo mod tidypulls in) so the suite compiles against the unmerged PR #1561. This fork pin is a pre-merge placeholder only, not the final dependency state: before this PR merges it must be swapped to the upstreamgithub.com/goravel/framework@masterpseudo-version andgo mod tidyre-run so thegithub.com/darakanoit/frameworklines leavego.sum.