diff --git a/.gitignore b/.gitignore index ae354d4..98d046e 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,15 @@ Thumbs.db .env.* !.env.example +# Xdebug +._icons/* +._js/* +._css/* +.phpunit.cache/ + +# PHPUnit Coverage Reports +_coverage/ +*.html +!resources/**/*.html + +tree diff --git a/phpunit.out b/phpunit.out new file mode 100644 index 0000000..233294a --- /dev/null +++ b/phpunit.out @@ -0,0 +1,1301 @@ +PHPUnit 12.5.2 by Sebastian Bergmann and contributors. + +Runtime: PHP 8.4.15 +Configuration: /Users/elliotanderson/php/baremetalphp-src/phpunit.xml + +..........E.............F...................................... 63 / 510 ( 12%) +.....................................................SSS.....S. 126 / 510 ( 24%) +............................................................... 189 / 510 ( 37%) +...F...F.........EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEF... 252 / 510 ( 49%) +..................Migration created: /private/var/folders/bk/l00_jcf56y92rzhh262xnxn00000gn/T/baremetal_migration_test_6939f77556301/database/migrations/20251210224301_test_migration.php +RMigration created: /private/var/folders/bk/l00_jcf56y92rzhh262xnxn00000gn/T/baremetal_migration_test_6939f7755667b/database/migrations/20251210224301_test_migration.php +R.Controller created: app/Http/Controllers/TestController.php +R......................................... 315 / 510 ( 61%) +..........N....EE...........FF................................. 378 / 510 ( 74%) +............................................................... 441 / 510 ( 86%) +WebSocket broadcast: failed to encode payload +R................EEEEEEEEEEInstalling Go app server into: /private/var/folders/bk/l00_jcf56y92rzhh262xnxn00000gn/T/baremetal_test_6939f77564969 +Created go.mod with module name: baremetal_test_6939f77564969 +EInstalling Go app server into: /private/var/folders/bk/l00_jcf56y92rzhh262xnxn00000gn/T/baremetal_test_6939f77564b9b +Created go.mod with module name: baremetal_test_6939f77564b9b +EInstalling Go app server into: /private/var/folders/bk/l00_jcf56y92rzhh262xnxn00000gn/T/baremetal_test_6939f77564d9e +Created go.mod with module name: baremetal_test_6939f77564d9e +EInstalling Go app server into: /private/var/folders/bk/l00_jcf56y92rzhh262xnxn00000gn/T/baremetal_test_6939f77565072 +Created go.mod with module name: baremetal_test_6939f77565072 +E..F.F.........NNNNEEEENo migration files found. +RNNNN..... 504 / 510 ( 98%) +...... 510 / 510 (100%) + +Time: 00:01.678, Memory: 22.00 MB + +There were 63 errors: + +1) Tests\Unit\ConfigTest::testAppServerConfigDefaults +RuntimeException: Cannot resolve parameter items + +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:180 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:142 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:141 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:124 +/Users/elliotanderson/php/baremetalphp-src/src/Support/helpers.php:82 +/Users/elliotanderson/php/baremetalphp-src/tests/Unit/ConfigTest.php:109 + +2) Tests\Unit\Frontend\AssetManagerTest::testIsDevReturnsFalseInProduction +RuntimeException: Cannot resolve parameter items + +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:180 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:142 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:141 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:124 +/Users/elliotanderson/php/baremetalphp-src/src/Support/helpers.php:82 +/Users/elliotanderson/php/baremetalphp-src/src/Frontend/AssetManager.php:25 +/Users/elliotanderson/php/baremetalphp-src/tests/Unit/Frontend/AssetManagerTest.php:45 + +3) Tests\Unit\Frontend\AssetManagerTest::testAssetReturnsProductionPathWhenManifestMissing +RuntimeException: Cannot resolve parameter items + +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:180 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:142 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:141 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:124 +/Users/elliotanderson/php/baremetalphp-src/src/Support/helpers.php:82 +/Users/elliotanderson/php/baremetalphp-src/src/Frontend/AssetManager.php:25 +/Users/elliotanderson/php/baremetalphp-src/tests/Unit/Frontend/AssetManagerTest.php:52 + +4) Tests\Unit\Frontend\AssetManagerTest::testCssReturnsEmptyArrayInDevelopment +RuntimeException: Cannot resolve parameter items + +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:180 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:142 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:141 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:124 +/Users/elliotanderson/php/baremetalphp-src/src/Support/helpers.php:82 +/Users/elliotanderson/php/baremetalphp-src/src/Frontend/AssetManager.php:39 +/Users/elliotanderson/php/baremetalphp-src/src/Frontend/AssetManager.php:23 +/Users/elliotanderson/php/baremetalphp-src/tests/Unit/Frontend/AssetManagerTest.php:99 + +5) Tests\Unit\Frontend\AssetManagerTest::testCssReturnsEmptyWhenManifestMissing +RuntimeException: Cannot resolve parameter items + +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:180 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:142 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:141 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:124 +/Users/elliotanderson/php/baremetalphp-src/src/Support/helpers.php:82 +/Users/elliotanderson/php/baremetalphp-src/src/Frontend/AssetManager.php:25 +/Users/elliotanderson/php/baremetalphp-src/tests/Unit/Frontend/AssetManagerTest.php:108 + +6) Tests\Unit\Frontend\AssetManagerTest::testViteClientReturnsEmptyInProduction +RuntimeException: Cannot resolve parameter items + +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:180 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:142 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:141 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:124 +/Users/elliotanderson/php/baremetalphp-src/src/Support/helpers.php:82 +/Users/elliotanderson/php/baremetalphp-src/src/Frontend/AssetManager.php:25 +/Users/elliotanderson/php/baremetalphp-src/tests/Unit/Frontend/AssetManagerTest.php:152 + +7) Tests\Unit\Frontend\AssetManagerTest::testViteClientReturnsScriptInDevelopment +RuntimeException: Cannot resolve parameter items + +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:180 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:142 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:141 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:124 +/Users/elliotanderson/php/baremetalphp-src/src/Support/helpers.php:82 +/Users/elliotanderson/php/baremetalphp-src/src/Frontend/AssetManager.php:39 +/Users/elliotanderson/php/baremetalphp-src/src/Frontend/AssetManager.php:23 +/Users/elliotanderson/php/baremetalphp-src/tests/Unit/Frontend/AssetManagerTest.php:166 + +8) Tests\Unit\Frontend\AssetManagerTest::testViteClientIncludesReactPreamble +RuntimeException: Cannot resolve parameter items + +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:180 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:142 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:141 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:124 +/Users/elliotanderson/php/baremetalphp-src/src/Support/helpers.php:82 +/Users/elliotanderson/php/baremetalphp-src/src/Frontend/AssetManager.php:39 +/Users/elliotanderson/php/baremetalphp-src/src/Frontend/AssetManager.php:23 +/Users/elliotanderson/php/baremetalphp-src/tests/Unit/Frontend/AssetManagerTest.php:189 + +9) Tests\Unit\Frontend\AssetManagerTest::testScriptGeneratesScriptTag +RuntimeException: Cannot resolve parameter items + +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:180 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:142 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:141 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:124 +/Users/elliotanderson/php/baremetalphp-src/src/Support/helpers.php:82 +/Users/elliotanderson/php/baremetalphp-src/src/Frontend/AssetManager.php:25 +/Users/elliotanderson/php/baremetalphp-src/tests/Unit/Frontend/AssetManagerTest.php:206 + +10) Tests\Unit\Frontend\AssetManagerTest::testScriptWithCustomAttributes +RuntimeException: Cannot resolve parameter items + +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:180 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:142 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:141 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:124 +/Users/elliotanderson/php/baremetalphp-src/src/Support/helpers.php:82 +/Users/elliotanderson/php/baremetalphp-src/src/Frontend/AssetManager.php:25 +/Users/elliotanderson/php/baremetalphp-src/tests/Unit/Frontend/AssetManagerTest.php:216 + +11) Tests\Unit\Frontend\AssetManagerTest::testScriptWithStringAttributes +RuntimeException: Cannot resolve parameter items + +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:180 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:142 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:141 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:124 +/Users/elliotanderson/php/baremetalphp-src/src/Support/helpers.php:82 +/Users/elliotanderson/php/baremetalphp-src/src/Frontend/AssetManager.php:25 +/Users/elliotanderson/php/baremetalphp-src/tests/Unit/Frontend/AssetManagerTest.php:225 + +12) Tests\Unit\Frontend\AssetManagerTest::testStylesReturnsEmptyInDevelopment +RuntimeException: Cannot resolve parameter items + +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:180 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:142 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:141 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:124 +/Users/elliotanderson/php/baremetalphp-src/src/Support/helpers.php:82 +/Users/elliotanderson/php/baremetalphp-src/src/Frontend/AssetManager.php:39 +/Users/elliotanderson/php/baremetalphp-src/src/Frontend/AssetManager.php:23 +/Users/elliotanderson/php/baremetalphp-src/tests/Unit/Frontend/AssetManagerTest.php:236 + +13) Tests\Unit\Frontend\AssetManagerTest::testGetManifestReturnsEmptyArrayWhenFileMissing +RuntimeException: Cannot resolve parameter items + +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:180 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:142 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:141 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:124 +/Users/elliotanderson/php/baremetalphp-src/src/Support/helpers.php:82 +/Users/elliotanderson/php/baremetalphp-src/src/Frontend/AssetManager.php:25 +/Users/elliotanderson/php/baremetalphp-src/tests/Unit/Frontend/AssetManagerTest.php:287 + +14) Tests\Unit\Frontend\AssetManagerTest::testBuildAttributesWithBooleanTrue +RuntimeException: Cannot resolve parameter items + +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:180 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:142 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:141 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:124 +/Users/elliotanderson/php/baremetalphp-src/src/Support/helpers.php:82 +/Users/elliotanderson/php/baremetalphp-src/src/Frontend/AssetManager.php:25 +/Users/elliotanderson/php/baremetalphp-src/tests/Unit/Frontend/AssetManagerTest.php:332 + +15) Tests\Unit\Frontend\AssetManagerTest::testBuildAttributesWithStringValue +RuntimeException: Cannot resolve parameter items + +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:180 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:142 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:141 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:124 +/Users/elliotanderson/php/baremetalphp-src/src/Support/helpers.php:82 +/Users/elliotanderson/php/baremetalphp-src/src/Frontend/AssetManager.php:25 +/Users/elliotanderson/php/baremetalphp-src/tests/Unit/Frontend/AssetManagerTest.php:346 + +16) Tests\Unit\Frontend\AssetManagerTest::testBuildAttributesIgnoresFalseAndNull +RuntimeException: Cannot resolve parameter items + +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:180 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:142 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:141 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:124 +/Users/elliotanderson/php/baremetalphp-src/src/Support/helpers.php:82 +/Users/elliotanderson/php/baremetalphp-src/src/Frontend/AssetManager.php:25 +/Users/elliotanderson/php/baremetalphp-src/tests/Unit/Frontend/AssetManagerTest.php:359 + +17) Tests\Unit\Frontend\AssetManagerTest::testAssetNormalizesPath +RuntimeException: Cannot resolve parameter items + +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:180 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:142 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:141 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:124 +/Users/elliotanderson/php/baremetalphp-src/src/Support/helpers.php:82 +/Users/elliotanderson/php/baremetalphp-src/src/Frontend/AssetManager.php:25 +/Users/elliotanderson/php/baremetalphp-src/tests/Unit/Frontend/AssetManagerTest.php:380 + +18) Tests\Unit\Frontend\AssetManagerTest::testCanCreateAssetManager +RuntimeException: Cannot resolve parameter items + +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:180 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:142 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:141 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:124 +/Users/elliotanderson/php/baremetalphp-src/src/Support/helpers.php:82 +/Users/elliotanderson/php/baremetalphp-src/src/Frontend/AssetManager.php:25 +/Users/elliotanderson/php/baremetalphp-src/tests/Unit/Frontend/AssetManagerTest.php:35 + +19) Tests\Unit\Frontend\AssetManagerTest::testAssetWithManifest +RuntimeException: Cannot resolve parameter items + +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:180 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:142 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:141 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:124 +/Users/elliotanderson/php/baremetalphp-src/src/Support/helpers.php:82 +/Users/elliotanderson/php/baremetalphp-src/src/Frontend/AssetManager.php:25 +/Users/elliotanderson/php/baremetalphp-src/tests/Unit/Frontend/AssetManagerTest.php:80 + +20) Tests\Unit\Frontend\AssetManagerTest::testCssReturnsFilesFromManifest +RuntimeException: Cannot resolve parameter items + +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:180 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:142 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:141 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:124 +/Users/elliotanderson/php/baremetalphp-src/src/Support/helpers.php:82 +/Users/elliotanderson/php/baremetalphp-src/src/Frontend/AssetManager.php:25 +/Users/elliotanderson/php/baremetalphp-src/tests/Unit/Frontend/AssetManagerTest.php:135 + +21) Tests\Unit\Frontend\AssetManagerTest::testStylesReturnsLinkTags +RuntimeException: Cannot resolve parameter items + +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:180 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:142 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:141 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:124 +/Users/elliotanderson/php/baremetalphp-src/src/Support/helpers.php:82 +/Users/elliotanderson/php/baremetalphp-src/src/Frontend/AssetManager.php:25 +/Users/elliotanderson/php/baremetalphp-src/tests/Unit/Frontend/AssetManagerTest.php:269 + +22) Tests\Unit\Frontend\AssetManagerTest::testGetManifestCachesResult +RuntimeException: Cannot resolve parameter items + +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:180 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:142 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:141 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:124 +/Users/elliotanderson/php/baremetalphp-src/src/Support/helpers.php:82 +/Users/elliotanderson/php/baremetalphp-src/src/Frontend/AssetManager.php:25 +/Users/elliotanderson/php/baremetalphp-src/tests/Unit/Frontend/AssetManagerTest.php:315 + +23) Tests\Unit\Frontend\SPAHelperTest::testRenderReturnsResponse +RuntimeException: Cannot resolve parameter items + +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:180 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:142 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:141 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:124 +/Users/elliotanderson/php/baremetalphp-src/src/Support/helpers.php:82 +/Users/elliotanderson/php/baremetalphp-src/src/Frontend/AssetManager.php:25 +/Users/elliotanderson/php/baremetalphp-src/tests/Unit/Frontend/SPAHelperTest.php:21 +/Users/elliotanderson/php/baremetalphp-src/tests/Unit/Frontend/SPAHelperTest.php:37 + +24) Tests\Unit\Frontend\SPAHelperTest::testRenderIncludesComponentInHtml +RuntimeException: Cannot resolve parameter items + +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:180 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:142 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:141 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:124 +/Users/elliotanderson/php/baremetalphp-src/src/Support/helpers.php:82 +/Users/elliotanderson/php/baremetalphp-src/src/Frontend/AssetManager.php:25 +/Users/elliotanderson/php/baremetalphp-src/tests/Unit/Frontend/SPAHelperTest.php:21 +/Users/elliotanderson/php/baremetalphp-src/tests/Unit/Frontend/SPAHelperTest.php:49 + +25) Tests\Unit\Frontend\SPAHelperTest::testRenderIncludesPropsInHtml +RuntimeException: Cannot resolve parameter items + +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:180 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:142 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:141 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:124 +/Users/elliotanderson/php/baremetalphp-src/src/Support/helpers.php:82 +/Users/elliotanderson/php/baremetalphp-src/src/Frontend/AssetManager.php:25 +/Users/elliotanderson/php/baremetalphp-src/tests/Unit/Frontend/SPAHelperTest.php:21 +/Users/elliotanderson/php/baremetalphp-src/tests/Unit/Frontend/SPAHelperTest.php:62 + +26) Tests\Unit\Frontend\SPAHelperTest::testRenderUsesDefaultLayoutWhenLayoutFileMissing +RuntimeException: Cannot resolve parameter items + +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:180 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:142 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:141 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:124 +/Users/elliotanderson/php/baremetalphp-src/src/Support/helpers.php:82 +/Users/elliotanderson/php/baremetalphp-src/src/Frontend/AssetManager.php:25 +/Users/elliotanderson/php/baremetalphp-src/tests/Unit/Frontend/SPAHelperTest.php:21 +/Users/elliotanderson/php/baremetalphp-src/tests/Unit/Frontend/SPAHelperTest.php:76 + +27) Tests\Unit\Frontend\SPAHelperTest::testJsonReturnsJsonResponse +RuntimeException: Cannot resolve parameter items + +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:180 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:142 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:141 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:124 +/Users/elliotanderson/php/baremetalphp-src/src/Support/helpers.php:82 +/Users/elliotanderson/php/baremetalphp-src/src/Frontend/AssetManager.php:25 +/Users/elliotanderson/php/baremetalphp-src/tests/Unit/Frontend/SPAHelperTest.php:21 +/Users/elliotanderson/php/baremetalphp-src/tests/Unit/Frontend/SPAHelperTest.php:120 + +28) Tests\Unit\Frontend\SPAHelperTest::testJsonWithCustomStatus +RuntimeException: Cannot resolve parameter items + +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:180 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:142 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:141 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:124 +/Users/elliotanderson/php/baremetalphp-src/src/Support/helpers.php:82 +/Users/elliotanderson/php/baremetalphp-src/src/Frontend/AssetManager.php:25 +/Users/elliotanderson/php/baremetalphp-src/tests/Unit/Frontend/SPAHelperTest.php:21 +/Users/elliotanderson/php/baremetalphp-src/tests/Unit/Frontend/SPAHelperTest.php:136 + +29) Tests\Unit\Frontend\SPAHelperTest::testCsrfTokenReturnsEmptyString +RuntimeException: Cannot resolve parameter items + +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:180 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:142 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:141 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:124 +/Users/elliotanderson/php/baremetalphp-src/src/Support/helpers.php:82 +/Users/elliotanderson/php/baremetalphp-src/src/Frontend/AssetManager.php:25 +/Users/elliotanderson/php/baremetalphp-src/tests/Unit/Frontend/SPAHelperTest.php:21 +/Users/elliotanderson/php/baremetalphp-src/tests/Unit/Frontend/SPAHelperTest.php:146 + +30) Tests\Unit\Frontend\SPAHelperTest::testBuildDefaultLayoutIncludesAssetManagerMethods +RuntimeException: Cannot resolve parameter items + +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:180 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:142 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:141 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:124 +/Users/elliotanderson/php/baremetalphp-src/src/Support/helpers.php:82 +/Users/elliotanderson/php/baremetalphp-src/src/Frontend/AssetManager.php:25 +/Users/elliotanderson/php/baremetalphp-src/tests/Unit/Frontend/SPAHelperTest.php:21 +/Users/elliotanderson/php/baremetalphp-src/tests/Unit/Frontend/SPAHelperTest.php:157 + +31) Tests\Unit\Frontend\SPAHelperTest::testRenderEscapesPropsInJson +RuntimeException: Cannot resolve parameter items + +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:180 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:142 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:141 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:124 +/Users/elliotanderson/php/baremetalphp-src/src/Support/helpers.php:82 +/Users/elliotanderson/php/baremetalphp-src/src/Frontend/AssetManager.php:25 +/Users/elliotanderson/php/baremetalphp-src/tests/Unit/Frontend/SPAHelperTest.php:21 +/Users/elliotanderson/php/baremetalphp-src/tests/Unit/Frontend/SPAHelperTest.php:177 + +32) Tests\Unit\Frontend\SPAHelperTest::testCanCreateSPAHelper +RuntimeException: Cannot resolve parameter items + +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:180 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:142 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:141 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:124 +/Users/elliotanderson/php/baremetalphp-src/src/Support/helpers.php:82 +/Users/elliotanderson/php/baremetalphp-src/src/Frontend/AssetManager.php:25 +/Users/elliotanderson/php/baremetalphp-src/tests/Unit/Frontend/SPAHelperTest.php:21 +/Users/elliotanderson/php/baremetalphp-src/tests/Unit/Frontend/SPAHelperTest.php:29 + +33) Tests\Unit\Frontend\SPAHelperTest::testRenderWithCustomLayout +RuntimeException: Cannot resolve parameter items + +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:180 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:142 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:141 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:124 +/Users/elliotanderson/php/baremetalphp-src/src/Support/helpers.php:82 +/Users/elliotanderson/php/baremetalphp-src/src/Frontend/AssetManager.php:25 +/Users/elliotanderson/php/baremetalphp-src/tests/Unit/Frontend/SPAHelperTest.php:21 +/Users/elliotanderson/php/baremetalphp-src/tests/Unit/Frontend/SPAHelperTest.php:101 + +34) Tests\Unit\Frontend\ViteDevMiddlewareTest::testHandlePassesThroughNonViteAssets +RuntimeException: Cannot resolve parameter items + +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:180 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:142 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:141 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:124 +/Users/elliotanderson/php/baremetalphp-src/src/Support/helpers.php:82 +/Users/elliotanderson/php/baremetalphp-src/src/Frontend/Middleware/ViteDevMiddleware.php:19 +/Users/elliotanderson/php/baremetalphp-src/tests/Unit/Frontend/ViteDevMiddlewareTest.php:26 + +35) Tests\Unit\Frontend\ViteDevMiddlewareTest::testIsViteAssetDetectsVitePaths +RuntimeException: Cannot resolve parameter items + +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:180 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:142 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:141 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:124 +/Users/elliotanderson/php/baremetalphp-src/src/Support/helpers.php:82 +/Users/elliotanderson/php/baremetalphp-src/src/Frontend/Middleware/ViteDevMiddleware.php:19 +/Users/elliotanderson/php/baremetalphp-src/tests/Unit/Frontend/ViteDevMiddlewareTest.php:47 + +36) Tests\Unit\Frontend\ViteDevMiddlewareTest::testExtractContentTypeFromHeaders +RuntimeException: Cannot resolve parameter items + +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:180 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:142 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:141 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:124 +/Users/elliotanderson/php/baremetalphp-src/src/Support/helpers.php:82 +/Users/elliotanderson/php/baremetalphp-src/src/Frontend/Middleware/ViteDevMiddleware.php:19 +/Users/elliotanderson/php/baremetalphp-src/tests/Unit/Frontend/ViteDevMiddlewareTest.php:70 + +37) Tests\Unit\Frontend\ViteDevMiddlewareTest::testExtractContentTypeReturnsDefaultWhenMissing +RuntimeException: Cannot resolve parameter items + +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:180 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:142 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:141 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:124 +/Users/elliotanderson/php/baremetalphp-src/src/Support/helpers.php:82 +/Users/elliotanderson/php/baremetalphp-src/src/Frontend/Middleware/ViteDevMiddleware.php:19 +/Users/elliotanderson/php/baremetalphp-src/tests/Unit/Frontend/ViteDevMiddlewareTest.php:84 + +38) Tests\Unit\Frontend\ViteDevMiddlewareTest::testExtractContentTypeHandlesCaseInsensitive +RuntimeException: Cannot resolve parameter items + +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:180 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:142 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:141 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:124 +/Users/elliotanderson/php/baremetalphp-src/src/Support/helpers.php:82 +/Users/elliotanderson/php/baremetalphp-src/src/Frontend/Middleware/ViteDevMiddleware.php:19 +/Users/elliotanderson/php/baremetalphp-src/tests/Unit/Frontend/ViteDevMiddlewareTest.php:98 + +39) Tests\Unit\Frontend\ViteDevMiddlewareTest::testProxyToViteReturns404ForNon200Response +RuntimeException: Cannot resolve parameter items + +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:180 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:142 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:141 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:124 +/Users/elliotanderson/php/baremetalphp-src/src/Support/helpers.php:82 +/Users/elliotanderson/php/baremetalphp-src/src/Frontend/Middleware/ViteDevMiddleware.php:19 +/Users/elliotanderson/php/baremetalphp-src/tests/Unit/Frontend/ViteDevMiddlewareTest.php:114 + +40) Tests\Unit\Frontend\ViteDevMiddlewareTest::testHandleProxiesViteAssets +RuntimeException: Cannot resolve parameter items + +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:180 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:142 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:141 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:124 +/Users/elliotanderson/php/baremetalphp-src/src/Support/helpers.php:82 +/Users/elliotanderson/php/baremetalphp-src/src/Frontend/Middleware/ViteDevMiddleware.php:19 +/Users/elliotanderson/php/baremetalphp-src/tests/Unit/Frontend/ViteDevMiddlewareTest.php:131 + +41) Tests\Unit\Frontend\ViteDevMiddlewareTest::testCanCreateViteDevMiddleware +RuntimeException: Cannot resolve parameter items + +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:180 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:142 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:141 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:124 +/Users/elliotanderson/php/baremetalphp-src/src/Support/helpers.php:82 +/Users/elliotanderson/php/baremetalphp-src/src/Frontend/Middleware/ViteDevMiddleware.php:19 +/Users/elliotanderson/php/baremetalphp-src/tests/Unit/Frontend/ViteDevMiddlewareTest.php:19 + +42) Tests\Unit\HelperFunctionsTest::testConfigFunction +RuntimeException: Cannot resolve parameter items + +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:180 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:142 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:141 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:124 +/Users/elliotanderson/php/baremetalphp-src/src/Support/helpers.php:82 +/Users/elliotanderson/php/baremetalphp-src/tests/Unit/HelperFunctionsTest.php:48 + +43) Tests\Unit\HelperFunctionsTest::testConfigFunctionWithDefault +RuntimeException: Cannot resolve parameter items + +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:180 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:142 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:141 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:124 +/Users/elliotanderson/php/baremetalphp-src/src/Support/helpers.php:82 +/Users/elliotanderson/php/baremetalphp-src/tests/Unit/HelperFunctionsTest.php:55 + +44) Tests\Unit\Routing\RouterAdvancedTest::testRouteWithMiddleware +Error: Call to undefined method BareMetalPHP\Http\Response::setHeader() + +/Users/elliotanderson/php/baremetalphp-src/tests/Unit/Routing/RouterAdvancedTest.php:51 +/Users/elliotanderson/php/baremetalphp-src/src/Routing/Router.php:426 +/Users/elliotanderson/php/baremetalphp-src/src/Routing/Router.php:432 +/Users/elliotanderson/php/baremetalphp-src/src/Routing/Router.php:185 +/Users/elliotanderson/php/baremetalphp-src/tests/Unit/Routing/RouterAdvancedTest.php:62 + +45) Tests\Unit\Routing\RouterAdvancedTest::testRouteWithMultipleMiddleware +Error: Call to undefined method BareMetalPHP\Http\Response::setHeader() + +/Users/elliotanderson/php/baremetalphp-src/tests/Unit/Routing/RouterAdvancedTest.php:83 +/Users/elliotanderson/php/baremetalphp-src/src/Routing/Router.php:426 +/Users/elliotanderson/php/baremetalphp-src/tests/Unit/Routing/RouterAdvancedTest.php:73 +/Users/elliotanderson/php/baremetalphp-src/src/Routing/Router.php:426 +/Users/elliotanderson/php/baremetalphp-src/src/Routing/Router.php:432 +/Users/elliotanderson/php/baremetalphp-src/src/Routing/Router.php:185 +/Users/elliotanderson/php/baremetalphp-src/tests/Unit/Routing/RouterAdvancedTest.php:95 + +46) Tests\Feature\EnvTest::testCanLoadEnvFile +ReflectionException: Property BareMetalPHP\Support\Env::$loaded does not exist + +/Users/elliotanderson/php/baremetalphp-src/tests/Feature/EnvTest.php:21 +/Users/elliotanderson/php/baremetalphp-src/vendor/bin/phpunit:122 + +47) Tests\Feature\EnvTest::testCanCastBooleanValues +ReflectionException: Property BareMetalPHP\Support\Env::$loaded does not exist + +/Users/elliotanderson/php/baremetalphp-src/tests/Feature/EnvTest.php:21 +/Users/elliotanderson/php/baremetalphp-src/vendor/bin/phpunit:122 + +48) Tests\Feature\EnvTest::testCanCastIntegerValues +ReflectionException: Property BareMetalPHP\Support\Env::$loaded does not exist + +/Users/elliotanderson/php/baremetalphp-src/tests/Feature/EnvTest.php:21 +/Users/elliotanderson/php/baremetalphp-src/vendor/bin/phpunit:122 + +49) Tests\Feature\EnvTest::testCanCastFloatValues +ReflectionException: Property BareMetalPHP\Support\Env::$loaded does not exist + +/Users/elliotanderson/php/baremetalphp-src/tests/Feature/EnvTest.php:21 +/Users/elliotanderson/php/baremetalphp-src/vendor/bin/phpunit:122 + +50) Tests\Feature\EnvTest::testCanCastArrayValues +ReflectionException: Property BareMetalPHP\Support\Env::$loaded does not exist + +/Users/elliotanderson/php/baremetalphp-src/tests/Feature/EnvTest.php:21 +/Users/elliotanderson/php/baremetalphp-src/vendor/bin/phpunit:122 + +51) Tests\Feature\EnvTest::testCanHandleQuotedValues +ReflectionException: Property BareMetalPHP\Support\Env::$loaded does not exist + +/Users/elliotanderson/php/baremetalphp-src/tests/Feature/EnvTest.php:21 +/Users/elliotanderson/php/baremetalphp-src/vendor/bin/phpunit:122 + +52) Tests\Feature\EnvTest::testCanSkipComments +ReflectionException: Property BareMetalPHP\Support\Env::$loaded does not exist + +/Users/elliotanderson/php/baremetalphp-src/tests/Feature/EnvTest.php:21 +/Users/elliotanderson/php/baremetalphp-src/vendor/bin/phpunit:122 + +53) Tests\Feature\EnvTest::testCanCheckIfEnvExists +ReflectionException: Property BareMetalPHP\Support\Env::$loaded does not exist + +/Users/elliotanderson/php/baremetalphp-src/tests/Feature/EnvTest.php:21 +/Users/elliotanderson/php/baremetalphp-src/vendor/bin/phpunit:122 + +54) Tests\Feature\InstallGoAppServerCommandTest::testAppServerConfigDefaults +RuntimeException: Cannot resolve parameter items + +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:180 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:142 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:141 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:124 +/Users/elliotanderson/php/baremetalphp-src/src/Support/helpers.php:82 +/Users/elliotanderson/php/baremetalphp-src/tests/Feature/InstallGoAppServerCommandTest.php:218 +/Users/elliotanderson/php/baremetalphp-src/vendor/bin/phpunit:122 + +55) Tests\Feature\InstallGoAppServerCommandTest::testCanInstallGoServerFiles +RuntimeException: Cannot resolve parameter items + +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:180 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:142 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:141 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:124 +/Users/elliotanderson/php/baremetalphp-src/src/Support/helpers.php:82 +/Users/elliotanderson/php/baremetalphp-src/src/Console/Commands/InstallGoAppServerCommand.php:74 +/Users/elliotanderson/php/baremetalphp-src/src/Console/Commands/InstallGoAppServerCommand.php:22 +/Users/elliotanderson/php/baremetalphp-src/tests/Feature/InstallGoAppServerCommandTest.php:78 +/Users/elliotanderson/php/baremetalphp-src/vendor/bin/phpunit:122 + +56) Tests\Feature\InstallGoAppServerCommandTest::testGoFilesContainCorrectContent +RuntimeException: Cannot resolve parameter items + +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:180 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:142 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:141 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:124 +/Users/elliotanderson/php/baremetalphp-src/src/Support/helpers.php:82 +/Users/elliotanderson/php/baremetalphp-src/src/Console/Commands/InstallGoAppServerCommand.php:74 +/Users/elliotanderson/php/baremetalphp-src/src/Console/Commands/InstallGoAppServerCommand.php:22 +/Users/elliotanderson/php/baremetalphp-src/tests/Feature/InstallGoAppServerCommandTest.php:145 +/Users/elliotanderson/php/baremetalphp-src/vendor/bin/phpunit:122 + +57) Tests\Feature\InstallGoAppServerCommandTest::testPhpFilesContainCorrectContent +RuntimeException: Cannot resolve parameter items + +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:180 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:142 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:141 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:124 +/Users/elliotanderson/php/baremetalphp-src/src/Support/helpers.php:82 +/Users/elliotanderson/php/baremetalphp-src/src/Console/Commands/InstallGoAppServerCommand.php:74 +/Users/elliotanderson/php/baremetalphp-src/src/Console/Commands/InstallGoAppServerCommand.php:22 +/Users/elliotanderson/php/baremetalphp-src/tests/Feature/InstallGoAppServerCommandTest.php:236 +/Users/elliotanderson/php/baremetalphp-src/vendor/bin/phpunit:122 + +58) Tests\Feature\InstallGoAppServerCommandTest::testGoConfigFileReflectsAppServerConfig +RuntimeException: Cannot resolve parameter items + +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:180 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:142 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:141 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:124 +/Users/elliotanderson/php/baremetalphp-src/src/Support/helpers.php:82 +/Users/elliotanderson/php/baremetalphp-src/src/Console/Commands/InstallGoAppServerCommand.php:74 +/Users/elliotanderson/php/baremetalphp-src/src/Console/Commands/InstallGoAppServerCommand.php:22 +/Users/elliotanderson/php/baremetalphp-src/tests/Feature/InstallGoAppServerCommandTest.php:291 +/Users/elliotanderson/php/baremetalphp-src/vendor/bin/phpunit:122 + +59) Tests\Feature\InstallGoAppServerCommandTest::testGoModUsesCorrectModuleName +RuntimeException: Cannot resolve parameter items + +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:180 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:142 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:141 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:124 +/Users/elliotanderson/php/baremetalphp-src/src/Support/helpers.php:82 +/Users/elliotanderson/php/baremetalphp-src/src/Console/Commands/InstallGoAppServerCommand.php:74 +/Users/elliotanderson/php/baremetalphp-src/src/Console/Commands/InstallGoAppServerCommand.php:22 +/Users/elliotanderson/php/baremetalphp-src/tests/Feature/InstallGoAppServerCommandTest.php:320 +/Users/elliotanderson/php/baremetalphp-src/vendor/bin/phpunit:122 + +60) Tests\Feature\GoServeCommandTest::testShowsDisabledMessageWhenNotEnabled +RuntimeException: Cannot resolve parameter items + +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:180 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:142 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:141 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:124 +/Users/elliotanderson/php/baremetalphp-src/src/Support/helpers.php:82 +/Users/elliotanderson/php/baremetalphp-src/src/Console/Commands/GoServeCommand.php:9 +/Users/elliotanderson/php/baremetalphp-src/tests/Feature/GoServeCommandTest.php:72 +/Users/elliotanderson/php/baremetalphp-src/vendor/bin/phpunit:122 + +61) Tests\Feature\GoServeCommandTest::testGoServeShowsDisabledMessageWhenNotEnabled +RuntimeException: Cannot resolve parameter items + +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:180 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:142 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:141 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:124 +/Users/elliotanderson/php/baremetalphp-src/src/Support/helpers.php:82 +/Users/elliotanderson/php/baremetalphp-src/src/Console/Commands/GoServeCommand.php:9 +/Users/elliotanderson/php/baremetalphp-src/src/Console/Application.php:83 +/Users/elliotanderson/php/baremetalphp-src/tests/Feature/GoServeCommandTest.php:109 +/Users/elliotanderson/php/baremetalphp-src/tests/Feature/GoServeCommandTest.php:122 +/Users/elliotanderson/php/baremetalphp-src/vendor/bin/phpunit:122 + +62) Tests\Feature\GoServeCommandTest::testGoServeDryRunPrintsCommand +RuntimeException: Cannot resolve parameter items + +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:180 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:142 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:141 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:124 +/Users/elliotanderson/php/baremetalphp-src/src/Support/helpers.php:82 +/Users/elliotanderson/php/baremetalphp-src/src/Console/Commands/GoServeCommand.php:9 +/Users/elliotanderson/php/baremetalphp-src/src/Console/Application.php:83 +/Users/elliotanderson/php/baremetalphp-src/tests/Feature/GoServeCommandTest.php:109 +/Users/elliotanderson/php/baremetalphp-src/tests/Feature/GoServeCommandTest.php:144 +/Users/elliotanderson/php/baremetalphp-src/vendor/bin/phpunit:122 + +63) Tests\Feature\GoServeCommandTest::testDryRunShowsCommand +RuntimeException: Cannot resolve parameter items + +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:180 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:142 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:141 +/Users/elliotanderson/php/baremetalphp-src/src/Application.php:124 +/Users/elliotanderson/php/baremetalphp-src/src/Support/helpers.php:82 +/Users/elliotanderson/php/baremetalphp-src/src/Console/Commands/GoServeCommand.php:9 +/Users/elliotanderson/php/baremetalphp-src/tests/Feature/GoServeCommandTest.php:53 +/Users/elliotanderson/php/baremetalphp-src/vendor/bin/phpunit:122 + +-- + +There were 8 failures: + +1) Tests\Unit\Database\BelongsToManyTest::testSync +Failed asserting that an array contains '2'. + +/Users/elliotanderson/php/baremetalphp-src/tests/Unit/Database/BelongsToManyTest.php:296 + +2) Tests\Unit\Exceptions\ErrorHandlerTest::testDebugResponseIncludesStackTrace +Failed asserting that '\n +

Unhandled Exception

\n +

Exception: Test

\n +

File: /Users/elliotanderson/php/baremetalphp-src/tests/Unit/Exceptions/ErrorHandlerTest.php

\n +

Line: 86

\n +

Trace:

\n +
#0 /Users/elliotanderson/php/baremetalphp-src/vendor/phpunit/phpunit/src/Framework/TestCase.php(1326): Tests\Unit\Exceptions\ErrorHandlerTest->testDebugResponseIncludesStackTrace()\n
+#1 /Users/elliotanderson/php/baremetalphp-src/vendor/phpunit/phpunit/src/Framework/TestCase.php(519): PHPUnit\Framework\TestCase->runTest()\n
+#2 /Users/elliotanderson/php/baremetalphp-src/vendor/phpunit/phpunit/src/Framework/TestRunner/TestRunner.php(99): PHPUnit\Framework\TestCase->runBare()\n
+#3 /Users/elliotanderson/php/baremetalphp-src/vendor/phpunit/phpunit/src/Framework/TestCase.php(359): PHPUnit\Framework\TestRunner->run(Object(Tests\Unit\Exceptions\ErrorHandlerTest))\n
+#4 /Users/elliotanderson/php/baremetalphp-src/vendor/phpunit/phpunit/src/Framework/TestSuite.php(374): PHPUnit\Framework\TestCase->run()\n
+#5 /Users/elliotanderson/php/baremetalphp-src/vendor/phpunit/phpunit/src/Framework/TestSuite.php(374): PHPUnit\Framework\TestSuite->run()\n
+#6 /Users/elliotanderson/php/baremetalphp-src/vendor/phpunit/phpunit/src/Framework/TestSuite.php(374): PHPUnit\Framework\TestSuite->run()\n
+#7 /Users/elliotanderson/php/baremetalphp-src/vendor/phpunit/phpunit/src/TextUI/TestRunner.php(64): PHPUnit\Framework\TestSuite->run()\n
+#8 /Users/elliotanderson/php/baremetalphp-src/vendor/phpunit/phpunit/src/TextUI/Application.php(229): PHPUnit\TextUI\TestRunner->run(Object(PHPUnit\TextUI\Configuration\Configuration), Object(PHPUnit\Runner\ResultCache\DefaultResultCache), Object(PHPUnit\Framework\TestSuite))\n
+#9 /Users/elliotanderson/php/baremetalphp-src/vendor/phpunit/phpunit/phpunit(104): PHPUnit\TextUI\Application->run(Array)\n
+#10 /Users/elliotanderson/php/baremetalphp-src/vendor/bin/phpunit(122): include('/Users/elliotan...')\n
+#11 {main}
\n + ' [ASCII](length: 2043) contains "getTraceAsString" [ASCII](length: 16). + +/Users/elliotanderson/php/baremetalphp-src/tests/Unit/Exceptions/ErrorHandlerTest.php:91 + +3) Tests\Unit\Exceptions\ErrorPageRendererTest::testRenderEscapesHtml +Failed asserting that '\n +\n +\n + \n + Unhandled Exception - RuntimeException\n + \n +\n +\n +
\n +
\n +
\n +
\n +
\n +
\n +
mini • debug
\n +
\n +\n +
\n +
\n + Unhandled Exception\n + RuntimeException\n +
\n + \n + \n + \n +
\n +
\n +
\n + <script>alert("xss")</script>\n +
\n +
\n + in /Users/elliotanderson/php/baremetalphp-src/tests/Unit/Exceptions/ErrorPageRendererTest.php on line 115\n +
\n +
\n +\n +
\n +
\n +
Code Excerpt
\n +
\n +
109 $this->assertStringContainsString('POST', $html);
\n +
110 $this->assertStringContainsString('/api/users', $html);
\n +
111 }
\n +
112
\n +
113 public function testRenderEscapesHtml(): void
\n +
114 {
\n +
115 $exception = new \RuntimeException('<script>alert("xss")</script>');
\n +
116 $html = ErrorPageRenderer::render($exception);
\n +
117
\n +
118 // Should escape HTML in exception message
\n +
119 $this->assertStringNotContainsString('<script>', $html);
\n +
120 $this->assertStringContainsString('&lt;script&gt;', $html);
\n +
121 }
\n +
\n +
\n +
\n +
Stack Trace
\n +
\n + Show frames:\n + \n + \n +
\n +
\n +
#0 RuntimeException::() App
/Users/elliotanderson/php/baremetalphp-src/tests/Unit/Exceptions/ErrorPageRendererTest.php:115
\n +
#1 Tests\Unit\Exceptions\ErrorPageRendererTest->testRenderEscapesHtml() Framework
/Users/elliotanderson/php/baremetalphp-src/vendor/phpunit/phpunit/src/Framework/TestCase.php:1326
\n +
#2 PHPUnit\Framework\TestCase->runTest() Framework
/Users/elliotanderson/php/baremetalphp-src/vendor/phpunit/phpunit/src/Framework/TestCase.php:519
\n +
#3 PHPUnit\Framework\TestCase->runBare() Framework
/Users/elliotanderson/php/baremetalphp-src/vendor/phpunit/phpunit/src/Framework/TestRunner/TestRunner.php:99
\n +
#4 PHPUnit\Framework\TestRunner->run() Framework
/Users/elliotanderson/php/baremetalphp-src/vendor/phpunit/phpunit/src/Framework/TestCase.php:359
\n +
#5 PHPUnit\Framework\TestCase->run() Framework
/Users/elliotanderson/php/baremetalphp-src/vendor/phpunit/phpunit/src/Framework/TestSuite.php:374
\n +
#6 PHPUnit\Framework\TestSuite->run() Framework
/Users/elliotanderson/php/baremetalphp-src/vendor/phpunit/phpunit/src/Framework/TestSuite.php:374
\n +
#7 PHPUnit\Framework\TestSuite->run() Framework
/Users/elliotanderson/php/baremetalphp-src/vendor/phpunit/phpunit/src/Framework/TestSuite.php:374
\n +
#8 PHPUnit\Framework\TestSuite->run() Framework
/Users/elliotanderson/php/baremetalphp-src/vendor/phpunit/phpunit/src/TextUI/TestRunner.php:64
\n +
#9 PHPUnit\TextUI\TestRunner->run() Framework
/Users/elliotanderson/php/baremetalphp-src/vendor/phpunit/phpunit/src/TextUI/Application.php:229
\n +
#10 PHPUnit\TextUI\Application->run() Framework
/Users/elliotanderson/php/baremetalphp-src/vendor/phpunit/phpunit/phpunit:104
\n +
#11 include() Framework
/Users/elliotanderson/php/baremetalphp-src/vendor/bin/phpunit:122
\n +
\n +
\n +
\n +\n +
\n +
Request Context
\n +
\n +
\n +
\n +
Method
\n +
GET
\n +
URI
\n +
/
\n +
Client IP
\n +
unknown
\n +
\n +
\n +
\n +
GET
\n +
(empty)
\n +
\n +
\n +
POST
\n +
(empty)
\n +
\n +
\n +
\n +
\n +
\n +
\n +
Cookies
\n +
(empty)
\n +
\n +
\n +
\n +
\n +
Server / Headers
\n +
(empty)
\n +
\n +
\n +
\n +
\n +\n +
\n +
Container / IoC Bindings
\n +
(container not available)
\n +
\n + \n + \n +\n +\n +\n +\n +' [UTF-8](length: 21852) does not contain "'); + $html = ErrorPageRenderer::render($exception); + + // Should escape HTML in exception message (in the error-message div) + // The message should be escaped, but the JSON in the script tag will have escaped quotes + $this->assertStringContainsString('<script>', $html); + // Check that the visible error message div has escaped content + $this->assertStringContainsString('id="error-message"', $html); + // The actual script tag in the HTML structure should not appear unescaped in the message area + // (it may appear in JSON data, which is fine) + } +} + diff --git a/tests/Unit/Frontend/AssetManagerTest.php b/tests/Unit/Frontend/AssetManagerTest.php new file mode 100644 index 0000000..5a89094 --- /dev/null +++ b/tests/Unit/Frontend/AssetManagerTest.php @@ -0,0 +1,390 @@ +assertTrue(class_exists(AssetManager::class)); + + $manager = new AssetManager(); + + $this->assertInstanceOf(AssetManager::class, $manager); + } + + public function testIsDevReturnsFalseInProduction(): void + { + putenv('APP_ENV=production'); + $_ENV['APP_ENV'] = 'production'; + + $manager = new AssetManager(); + + $this->assertFalse($manager->isDev()); + } + + public function testAssetReturnsProductionPathWhenManifestMissing(): void + { + $manager = new AssetManager(); + $url = $manager->asset('resources/js/app.jsx'); + + $this->assertStringContainsString('/build/', $url); + $this->assertStringContainsString('app.jsx', $url); + } + + public function testAssetWithManifest(): void + { + // Create a temporary manifest file + $manifestDir = sys_get_temp_dir() . '/baremetal_test_' . uniqid(); + $manifestPath = $manifestDir . '/public/build/.vite/manifest.json'; + mkdir(dirname($manifestPath), 0755, true); + + $manifest = [ + 'resources/js/app.jsx' => [ + 'file' => 'assets/app-abc123.js', + 'css' => ['assets/app.css'] + ] + ]; + + file_put_contents($manifestPath, json_encode($manifest)); + + // Use reflection to set manifest path + $reflection = new \ReflectionClass(AssetManager::class); + $property = $reflection->getProperty('manifestPath'); + $property->setAccessible(true); + + $manager = new AssetManager(); + $property->setValue($manager, $manifestPath); + + $url = $manager->asset('resources/js/app.jsx'); + + $this->assertStringContainsString('/build/', $url); + $this->assertStringContainsString('app-abc123.js', $url); + + // Cleanup + unlink($manifestPath); + rmdir(dirname($manifestPath)); + rmdir(dirname(dirname($manifestPath))); + } + + public function testCssReturnsEmptyArrayInDevelopment(): void + { + putenv('APP_ENV=local'); + $_ENV['APP_ENV'] = 'local'; + + $manager = new AssetManager(); + $css = $manager->css('resources/js/app.jsx'); + + $this->assertIsArray($css); + $this->assertEmpty($css); + } + + public function testCssReturnsEmptyWhenManifestMissing(): void + { + $manager = new AssetManager(); + $css = $manager->css('resources/js/app.jsx'); + + $this->assertIsArray($css); + $this->assertEmpty($css); + } + + public function testCssReturnsFilesFromManifest(): void + { + // Create a temporary manifest file + $manifestDir = sys_get_temp_dir() . '/baremetal_test_' . uniqid(); + $manifestPath = $manifestDir . '/public/build/.vite/manifest.json'; + mkdir(dirname($manifestPath), 0755, true); + + $manifest = [ + 'resources/js/app.jsx' => [ + 'file' => 'assets/app.js', + 'css' => ['assets/app.css', 'assets/vendor.css'] + ] + ]; + + file_put_contents($manifestPath, json_encode($manifest)); + + $reflection = new \ReflectionClass(AssetManager::class); + $property = $reflection->getProperty('manifestPath'); + $property->setAccessible(true); + + $manager = new AssetManager(); + $property->setValue($manager, $manifestPath); + + $css = $manager->css('resources/js/app.jsx'); + + $this->assertCount(2, $css); + $this->assertContains('assets/app.css', $css); + $this->assertContains('assets/vendor.css', $css); + + // Cleanup + unlink($manifestPath); + rmdir(dirname($manifestPath)); + rmdir(dirname(dirname($manifestPath))); + } + + public function testViteClientReturnsEmptyInProduction(): void + { + $manager = new AssetManager(); + $client = $manager->viteClient(); + + $this->assertEmpty($client); + } + + public function testViteClientReturnsScriptInDevelopment(): void + { + putenv('APP_ENV=local'); + $_ENV['APP_ENV'] = 'local'; + + // Mock config to return null framework (no React preamble) + Config::set('frontend.framework', null); + + $manager = new AssetManager(); + $client = $manager->viteClient(); + + // In development, it will try to check for Vite server, but we can test the structure + // Since isViteDevServerRunning will likely return false in tests, isDevelopment will be false + // So we need to force development mode + $reflection = new \ReflectionClass(AssetManager::class); + $property = $reflection->getProperty('isDevelopment'); + $property->setAccessible(true); + $property->setValue($manager, true); + + $client = $manager->viteClient(); + + $this->assertStringContainsString('@vite/client', $client); + $this->assertStringContainsString('getProperty('isDevelopment'); + $property->setAccessible(true); + $property->setValue($manager, true); + + $client = $manager->viteClient(); + + $this->assertStringContainsString('@react-refresh', $client); + $this->assertStringContainsString('RefreshRuntime', $client); + $this->assertStringContainsString('@vite/client', $client); + } + + public function testScriptGeneratesScriptTag(): void + { + $manager = new AssetManager(); + $script = $manager->script('resources/js/app.jsx'); + + $this->assertStringContainsString('assertStringContainsString('type="module"', $script); + $this->assertStringContainsString('src=', $script); + } + + public function testScriptWithCustomAttributes(): void + { + $manager = new AssetManager(); + $script = $manager->script('resources/js/app.jsx', ['defer' => true, 'async' => true]); + + $this->assertStringContainsString('defer', $script); + $this->assertStringContainsString('async', $script); + } + + public function testScriptWithStringAttributes(): void + { + $manager = new AssetManager(); + $script = $manager->script('resources/js/app.jsx', ['data-test' => 'value']); + + $this->assertStringContainsString('data-test="value"', $script); + } + + public function testStylesReturnsEmptyInDevelopment(): void + { + putenv('APP_ENV=local'); + $_ENV['APP_ENV'] = 'local'; + + $manager = new AssetManager(); + + // Force development mode + $reflection = new \ReflectionClass(AssetManager::class); + $property = $reflection->getProperty('isDevelopment'); + $property->setAccessible(true); + $property->setValue($manager, true); + + $styles = $manager->styles('resources/js/app.jsx'); + + $this->assertEmpty($styles); + } + + public function testStylesReturnsLinkTags(): void + { + // Create a temporary manifest file + $manifestDir = sys_get_temp_dir() . '/baremetal_test_' . uniqid(); + $manifestPath = $manifestDir . '/public/build/.vite/manifest.json'; + mkdir(dirname($manifestPath), 0755, true); + + $manifest = [ + 'resources/js/app.jsx' => [ + 'file' => 'assets/app.js', + 'css' => ['assets/app.css', 'assets/vendor.css'] + ] + ]; + + file_put_contents($manifestPath, json_encode($manifest)); + + $reflection = new \ReflectionClass(AssetManager::class); + $property = $reflection->getProperty('manifestPath'); + $property->setAccessible(true); + + $manager = new AssetManager(); + $property->setValue($manager, $manifestPath); + + $styles = $manager->styles('resources/js/app.jsx'); + + $this->assertStringContainsString('assertStringContainsString('rel="stylesheet"', $styles); + $this->assertStringContainsString('app.css', $styles); + $this->assertStringContainsString('vendor.css', $styles); + + // Cleanup + unlink($manifestPath); + rmdir(dirname($manifestPath)); + rmdir(dirname(dirname($manifestPath))); + } + + public function testGetManifestReturnsEmptyArrayWhenFileMissing(): void + { + $manager = new AssetManager(); + + $reflection = new \ReflectionClass(AssetManager::class); + $method = $reflection->getMethod('getManifest'); + $method->setAccessible(true); + + $manifest = $method->invoke($manager); + + $this->assertIsArray($manifest); + $this->assertEmpty($manifest); + } + + public function testGetManifestCachesResult(): void + { + // Create a temporary manifest file + $manifestDir = sys_get_temp_dir() . '/baremetal_test_' . uniqid(); + $manifestPath = $manifestDir . '/public/build/.vite/manifest.json'; + mkdir(dirname($manifestPath), 0755, true); + + $manifest = ['test' => 'value']; + file_put_contents($manifestPath, json_encode($manifest)); + + $reflection = new \ReflectionClass(AssetManager::class); + $property = $reflection->getProperty('manifestPath'); + $property->setAccessible(true); + $method = $reflection->getMethod('getManifest'); + $method->setAccessible(true); + + $manager = new AssetManager(); + $property->setValue($manager, $manifestPath); + + $result1 = $method->invoke($manager); + $result2 = $method->invoke($manager); + + $this->assertSame($result1, $result2); + $this->assertArrayHasKey('test', $result1); + + // Cleanup + unlink($manifestPath); + rmdir(dirname($manifestPath)); + rmdir(dirname(dirname($manifestPath))); + } + + public function testBuildAttributesWithBooleanTrue(): void + { + $manager = new AssetManager(); + + $reflection = new \ReflectionClass(AssetManager::class); + $method = $reflection->getMethod('buildAttributes'); + $method->setAccessible(true); + + $attrs = $method->invoke($manager, ['defer' => true]); + + $this->assertStringContainsString('defer', $attrs); + $this->assertStringNotContainsString('="', $attrs); + } + + public function testBuildAttributesWithStringValue(): void + { + $manager = new AssetManager(); + + $reflection = new \ReflectionClass(AssetManager::class); + $method = $reflection->getMethod('buildAttributes'); + $method->setAccessible(true); + + $attrs = $method->invoke($manager, ['data-test' => 'value']); + + $this->assertStringContainsString('data-test="value"', $attrs); + } + + public function testBuildAttributesIgnoresFalseAndNull(): void + { + $manager = new AssetManager(); + + $reflection = new \ReflectionClass(AssetManager::class); + $method = $reflection->getMethod('buildAttributes'); + $method->setAccessible(true); + + $attrs = $method->invoke($manager, [ + 'defer' => true, + 'async' => false, + 'test' => null, + 'valid' => 'value' + ]); + + $this->assertStringContainsString('defer', $attrs); + $this->assertStringContainsString('valid="value"', $attrs); + $this->assertStringNotContainsString('async', $attrs); + $this->assertStringNotContainsString('test', $attrs); + } + + public function testAssetNormalizesPath(): void + { + $manager = new AssetManager(); + + $url1 = $manager->asset('/resources/js/app.jsx'); + $url2 = $manager->asset('resources/js/app.jsx'); + + // Both should produce similar results (normalized) + $this->assertIsString($url1); + $this->assertIsString($url2); + } +} + diff --git a/tests/Unit/Frontend/SPAHelperTest.php b/tests/Unit/Frontend/SPAHelperTest.php new file mode 100644 index 0000000..c3f40a8 --- /dev/null +++ b/tests/Unit/Frontend/SPAHelperTest.php @@ -0,0 +1,196 @@ +assertTrue(class_exists(SPAHelper::class)); + + $assetManager = $this->createAssetManager(); + $helper = new SPAHelper($assetManager); + + $this->assertInstanceOf(SPAHelper::class, $helper); + } + + public function testRenderReturnsResponse(): void + { + $assetManager = $this->createAssetManager(); + $helper = new SPAHelper($assetManager); + + $response = $helper->render('Home', []); + + $this->assertInstanceOf(Response::class, $response); + $this->assertEquals(200, $response->getStatusCode()); + $this->assertEquals('text/html', $response->getHeaders()['Content-Type']); + } + + public function testRenderIncludesComponentInHtml(): void + { + $assetManager = $this->createAssetManager(); + $helper = new SPAHelper($assetManager); + + $response = $helper->render('Home', []); + $body = $response->getBody(); + + $this->assertStringContainsString('Home', $body); + $this->assertStringContainsString('data-component', $body); + $this->assertStringContainsString('
createAssetManager(); + $helper = new SPAHelper($assetManager); + + $props = ['userId' => 123, 'name' => 'John']; + $response = $helper->render('UserProfile', $props); + $body = $response->getBody(); + + $this->assertStringContainsString('data-props', $body); + $this->assertStringContainsString('123', $body); + $this->assertStringContainsString('John', $body); + } + + public function testRenderUsesDefaultLayoutWhenLayoutFileMissing(): void + { + $assetManager = $this->createAssetManager(); + $helper = new SPAHelper($assetManager); + + $response = $helper->render('Home', []); + $body = $response->getBody(); + + // Should use default layout (buildDefaultLayout) + $this->assertStringContainsString('', $body); + $this->assertStringContainsString('assertStringContainsString('', $body); + $this->assertStringContainsString('', $body); + } + + public function testRenderWithCustomLayout(): void + { + // Create a temporary layout file + $layoutDir = sys_get_temp_dir() . '/baremetal_test_' . uniqid() . '/resources/views/layouts'; + mkdir($layoutDir, 0755, true); + $layoutFile = $layoutDir . '/custom.php'; + + file_put_contents($layoutFile, 'Custom Layout: '); + + // Mock base_path to return our temp directory + $originalBasePath = function_exists('base_path') ? null : null; + + $assetManager = $this->createAssetManager(); + $helper = new SPAHelper($assetManager); + + // Use reflection to test buildSPAHTML with custom layout + $reflection = new \ReflectionClass(SPAHelper::class); + $method = $reflection->getMethod('buildSPAHTML'); + $method->setAccessible(true); + + // We can't easily mock base_path, so test the default layout path + $html = $method->invoke($helper, 'Home', [], 'custom'); + + // Cleanup + unlink($layoutFile); + rmdir($layoutDir); + rmdir(dirname($layoutDir)); + } + + public function testJsonReturnsJsonResponse(): void + { + $assetManager = $this->createAssetManager(); + $helper = new SPAHelper($assetManager); + + $data = ['status' => 'success', 'message' => 'Hello']; + $response = $helper->json($data); + + $this->assertInstanceOf(Response::class, $response); + $this->assertEquals(200, $response->getStatusCode()); + + $body = json_decode($response->getBody(), true); + $this->assertIsArray($body); + $this->assertEquals('success', $body['status']); + } + + public function testJsonWithCustomStatus(): void + { + $assetManager = $this->createAssetManager(); + $helper = new SPAHelper($assetManager); + + $response = $helper->json(['error' => 'Not Found'], 404); + + $this->assertEquals(404, $response->getStatusCode()); + } + + public function testCsrfTokenReturnsEmptyString(): void + { + $assetManager = $this->createAssetManager(); + $helper = new SPAHelper($assetManager); + + $token = $helper->csrfToken(); + + $this->assertIsString($token); + $this->assertEmpty($token); + } + + public function testBuildDefaultLayoutIncludesAssetManagerMethods(): void + { + $assetManager = $this->createAssetManager(); + $helper = new SPAHelper($assetManager); + + $reflection = new \ReflectionClass(SPAHelper::class); + $method = $reflection->getMethod('buildDefaultLayout'); + $method->setAccessible(true); + + $html = $method->invoke($helper, 'Home', ['test' => 'value']); + + $this->assertStringContainsString('', $html); + $this->assertStringContainsString('assertStringContainsString('', $html); + $this->assertStringContainsString('', $html); + $this->assertStringContainsString('id="app"', $html); + $this->assertStringContainsString('data-component', $html); + $this->assertStringContainsString('data-props', $html); + } + + public function testRenderEscapesPropsInJson(): void + { + $assetManager = $this->createAssetManager(); + $helper = new SPAHelper($assetManager); + + // Test with props that need escaping + $props = [ + 'html' => '', + 'quote' => 'He said "hello"', + 'amp' => 'A & B' + ]; + + $response = $helper->render('Test', $props); + $body = $response->getBody(); + + // Props should be JSON encoded (which escapes) + $this->assertStringContainsString('data-props', $body); + // Should not contain raw script tags + $this->assertStringNotContainsString('