for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*******************************************************************************
* This file is part of the GraphQL Bundle package.
*
* (c) YnloUltratech <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
******************************************************************************/
namespace Ynlo\GraphQLBundle\Test;
use Symfony\Bundle\FrameworkBundle\Client;
use Symfony\Component\HttpFoundation\Response;
/**
* @method Client getClient()
*/
trait ResponseHelperTrait
{
* assertResponseEmptyContent
protected static function assertResponseEmptyContent()
self::assertEmpty(self::getClient()->getResponse()->getContent());
Ynlo\GraphQLBundle\Test\...elperTrait::getClient()
If this is a false-positive, you can also ignore this issue in your code via the ignore-call annotation
ignore-call
self::assertEmpty(self::/** @scrutinizer ignore-call */ getClient()->getResponse()->getContent());
}
* @param string $code
protected static function assertResponseCodeIs($code)
self::assertEquals($code, self::getClient()->getResponse()->getStatusCode());
self::assertEquals($code, self::/** @scrutinizer ignore-call */ getClient()->getResponse()->getStatusCode());
* assertResponseCodeIsOK
protected static function assertResponseCodeIsOK()
self::assertEquals(Response::HTTP_OK, self::getClient()->getResponse()->getStatusCode());
self::assertEquals(Response::HTTP_OK, self::/** @scrutinizer ignore-call */ getClient()->getResponse()->getStatusCode());
* @return Response
protected static function getResponse(): Response
return self::getClient()->getResponse();
return self::/** @scrutinizer ignore-call */ getClient()->getResponse();
return self::getClient()->getResponse()
null
Symfony\Component\HttpFoundation\Response