LiipFunctionalTestBundle | Some helper classes for writing functional tests in Symfony | Web Framework library
kandi X-RAY | LiipFunctionalTestBundle Summary
Support
Quality
Security
License
Reuse
- Get the configuration tree builder .
- Assert that the client response code matches the expected format .
- Assert that the response is successful .
- Get max query annotation
- On kernel request .
- Check query counter .
- Perform the request .
- Get max query count .
- Returns an array of event listeners .
- Clear the last exception .
LiipFunctionalTestBundle Key Features
LiipFunctionalTestBundle Examples and Code Snippets
Trending Discussions on LiipFunctionalTestBundle
Trending Discussions on LiipFunctionalTestBundle
QUESTION
I upgrade my project to Symfony 5.0. However, when running tests I get the following error:
TypeError: Argument 1 passed to App\Tests\PagesTestCase::form() must be an instance of Symfony\Bundle\FrameworkBundle\Client, instance of Symfony\Bundle\FrameworkBundle\KernelBrowser given
Argument 1 in this form is $userClient
, which is created with createClient
. In Symfony 5, Symfony\Bundle\FrameworkBundle\Client
is removed. Why is it still expecting an instance of Client? I am using LiipFunctionalTestBundle
I looked into the src of LiipFunctionalTestBundle
and found in QueryCountClient.php
the following:
if (!class_exists(Client::class)) {
class_alias(KernelBrowser::class, Client::class);
}
It seems to me that this should fix the issue, however, it does not. I am clueless about why I am getting this error.
ANSWER
Answered 2020-Feb-04 at 09:01I still had Client
somewhere in my code, so it expected a client.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install LiipFunctionalTestBundle
PHP requires the Visual C runtime (CRT). The Microsoft Visual C++ Redistributable for Visual Studio 2019 is suitable for all these PHP versions, see visualstudio.microsoft.com. You MUST download the x86 CRT for PHP x86 builds and the x64 CRT for PHP x64 builds. The CRT installer supports the /quiet and /norestart command-line switches, so you can also script it.
Support
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesExplore Kits - Develop, implement, customize Projects, Custom Functions and Applications with kandi kits
Save this library and start creating your kit
Share this Page