<commit_before><?php namespace Zephyrus\Tests\Application\Session;

use InvalidArgumentException;
use PHPUnit\Framework\TestCase;
use Zephyrus\Application\Session;

class SessionUnsecureConfigurationTest extends TestCase
{
    public static function tearDownAfterClass(): void
    {
        // Reapply default setting for future session initialisation
        ini_set('session.use_cookies', 1);
        ini_set('session.use_only_cookies', 1);
    }

    public function testUnsecureSessionInitialisation()
    {
        $this->expectException(InvalidArgumentException::class);
        ini_set('session.use_cookies', 0);
        ini_set('session.use_only_cookies', 0);
        Session::getInstance()->start();
    }<commit_msg>Used new SessionException for unsecure test<commit_after><?php namespace Zephyrus\Tests\Application\Session;

use PHPUnit\Framework\TestCase;
use Zephyrus\Application\Session;
use Zephyrus\Exceptions\SessionException;

class SessionUnsecureConfigurationTest extends TestCase
{
    public static function tearDownAfterClass(): void
    {
        // Reapply default setting for future session initialisation
        ini_set('session.use_cookies', 1);
        ini_set('session.use_only_cookies', 1);
    }

    public function testUnsecureSessionInitialisation()
    {
        $this->expectException(SessionException::class);
        ini_set('session.use_cookies', 0);
        ini_set('session.use_only_cookies', 0);
        Session::getInstance()->start();
    }
{'fraction_non_alphanumeric': 0.09959623149394348, 'fraction_numerical': 0.005383580080753701, 'mean_word_length': 4.127586206896551, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '3632228', 'n_tokens_mistral': 418, 'n_tokens_neox': 393, 'n_words': 81}