<commit_before><?php
declare(strict_types = 1);
/**
 * /tests/AppBundle/Services/Rest/Helper/RequestTest.php
 *
 * @author  TLe, <NAME> <<EMAIL>>
 */
namespace AppBundle\Services\Rest\Helper;

use App\Services\Rest\Helper\Request as RequestHelper;
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
use Symfony\Component\HttpFoundation\Request;

/**
 * Class RequestTest
 *
 * @package AppBundle\Services\Rest\Helper
 * @author  TLe, <NAME> <<EMAIL>>
 */
class RequestTest extends KernelTestCase
{
    public function testThatGetOrderByReturnsNullWithoutParameter()
    {
        $fakeRequest = Request::create('/', 'GET');

        static::assertNull(
            RequestHelper::getOrderBy($fakeRequest),
            'getOrderBy method did not return NULL as it should without any parameters'
        );
    }<commit_msg>Moar tests.<commit_after><?php
declare(strict_types = 1);
/**
 * /tests/AppBundle/Services/Rest/Helper/RequestTest.php
 *
 * @author  TLe, <NAME> <<EMAIL>>
 */
namespace AppBundle\Services\Rest\Helper;

use App\Services\Rest\Helper\Request as RequestHelper;
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
use Symfony\Component\HttpFoundation\Request;

/**
 * Class RequestTest
 *
 * @package AppBundle\Services\Rest\Helper
 * @author  TLe, <NAME> <<EMAIL>>
 */
class RequestTest extends KernelTestCase
{
    /**
     * @expectedException \Symfony\Component\HttpKernel\Exception\HttpException
     * @expectedExceptionMessage Current 'where' parameter is not valid JSON.
     */
    public function testThatGetCriteriaMethodThrowsAnExceptionWithInvalidWhereParameter()
    {
        $fakeRequest = Request::create('/', 'GET', ['where' => '{foo bar']);

        RequestHelper::getCriteria($fakeRequest);
    }

    public function testThatGetOrderByReturnsNullWithoutParameter()
    {
        $fakeRequest = Request::create('/', 'GET');

        static::assertNull(
            RequestHelper::getOrderBy($fakeRequest),
            'getOrderBy method did not return NULL as it should without any parameters'
        );
    }
{'fraction_non_alphanumeric': 0.12396694214876033, 'fraction_numerical': 0.0009722897423432182, 'mean_word_length': 3.819672131147541, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 16, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '671958', 'n_tokens_mistral': 578, 'n_tokens_neox': 570, 'n_words': 121}