-
Notifications
You must be signed in to change notification settings - Fork 351
Remove Website and DefaultController action #8073
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
Remove Website and DefaultController action #8073
Conversation
2ec00a7
to
26eb0c6
Compare
288db29
to
f314fde
Compare
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.
@Prokyonn added a ToDo for the Segment part here we should readd functional test for it when implemented
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.
367535e
to
668dec0
Compare
public function testPage406ForNotExistFormat(): void | ||
{ | ||
$this->client->request('GET', 'http://sulu.lo/.xml'); | ||
|
||
$response = $this->client->getResponse(); | ||
$this->assertHttpStatusCode(406, $response); | ||
} | ||
|
||
public function testPageClientAcceptHeaderNotUsed(): void | ||
{ | ||
$this->client->request('GET', 'http://sulu.lo/', [], [], [ | ||
'HTTP_ACCEPT' => 'text/plain', | ||
]); | ||
|
||
$response = $this->client->getResponse(); | ||
$this->assertHttpStatusCode(200, $response); | ||
|
||
// The accept header need to ignore so the http cache will have the correct content type in it | ||
$this->assertStringStartsWith( | ||
'text/html', | ||
$response->headers->get('Content-Type') | ||
); | ||
} |
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.
Copied this tests to our ExampleControllerTest maybe in future better move into own ContentControllerTest but better this way as it got not lost.
use Twig\Environment; | ||
use Twig\Loader\FilesystemLoader; | ||
|
||
class DefaultControllerTest extends TestCase |
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.
unnecessary tests as too much mocks and no new behaviour tests as where functional tested in WebsiteControllerTests and now new functional tests via ExampleControllerTest
8cb257c
to
c572334
Compare
use Symfony\Bundle\FrameworkBundle\KernelBrowser; | ||
|
||
#[\PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses] | ||
class SecurityListenerTest extends SuluTestCase |
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.
Added it to our ToDo that we recreate similar tests based on new content storage
What's in this PR?
Remove Website and DefaultController action.
Why?
The content bundle does provide the new website controller for content resolving. All usage of the old DefaultController or WebsiteController should now use the
Sulu\Content\UserInterface\Controller\Website\ContentController
instead.