-
Notifications
You must be signed in to change notification settings - Fork 11.4k
[8.x] Remove invalid Blade compiler test #37112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
9267b0c
to
b7680a2
Compare
I've updated this PR to just remove the invalid test (no point changing null to an empty string in this one, there's another test for that). |
$files->shouldReceive('get')->once()->with(null)->andReturn('Hello World'); | ||
$files->shouldReceive('exists')->once()->with(__DIR__)->andReturn(true); | ||
$files->shouldReceive('put')->once()->with(__DIR__.'/'.sha1(null).'.php', 'Hello World'); | ||
$compiler->setPath(null); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please find all places in the framework that might call this will null, and fix them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is at least one, in the service provider.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is at least one, in the service provider.
Sorry, didn't see this comment. Where exactly it is? Even using normal search, without any PhpStorm magic, I can't find it.
I don't see any reason to remove the test at the moment? |
@taylorotwell This test passes |
I'm not sure what is
ViewBladeCompilerTest::testDontIncludeNullPath()
meant to test, but within this testnull
is passed toBladeCompiler::setPath()
, which docblock says it only accepts strings. It's a setter forBladeCompiler::$path
which, according to docblock, also isn't nullable.framework/tests/View/ViewBladeCompilerTest.php
Line 186 in 9267b0c
Unless I'm missing something, I'll send a PR to 9.x to remove this test and revert changes inBladeCompiler
. If you decide this is the desired behavior, I'll update this PR to change types in docblocks to?string
.