<commit_before><?php
class SessionCookieTest extends PHPUnit_Framework_TestCase
{
  public static function setUpBeforeClass()
  {
    \Pimf\Request::$cookieData = new \Pimf\Param();
  }


  # start testing


  public function testCreatingNewInstance()
  {
    new \Pimf\Session\Storages\Cookie();
  }

  public function testIfNoKayAtCookie()
  {
    $storage = new \Pimf\Session\Storages\Cookie();

    $this->assertNull( $storage->load('some-bad-id') );
  }

  public function testSavingTheSession()
    {
      $session['id'] = 'cool-secret-id';
      $config['lifetime'] = 60;
      $config['path'] = '/nfs/opst/';
      $config['domain'] = 'www.pimf-framework.de';

      $storage = new \Pimf\Session\Storages\Cookie();

      $this->assertNull( $storage->save($session, $config, 60) );
    }

    public function testDeleteKeyThatIsNotAtTheSession()
    {
      $storage = new \Pimf\Session\Storages\Cookie();

      $this->assertNull( $storage->delete('some-bad-key') );
    }

  public function testRefreshing()
  {
    $storage = new \Pimf\Session\Storages\Cookie();

    $session1 = $storage->fresh();
    $session2 = $storage->fresh();

    $this->assertNotEquals($session1, $session2);
  }<commit_msg>added support for APCu (APC User Cache) - thank you <NAME> and <NAME><commit_after><?php
class SessionCookieTest extends PHPUnit_Framework_TestCase
{
  public static function setUpBeforeClass()
  {
    \Pimf\Request::$cookieData = new \Pimf\Param();
  }


  # start testing


  public function testCreatingNewInstance()
  {
    new \Pimf\Session\Storages\Cookie();
  }

  public function testIfNoKayAtCookie()
  {
    $storage = new \Pimf\Session\Storages\Cookie();

    $this->assertNull( $storage->load('some-bad-id') );
  }

  public function testRefreshing()
  {
    $storage = new \Pimf\Session\Storages\Cookie();

    $session1 = $storage->fresh();
    $session2 = $storage->fresh();

    $this->assertNotEquals($session1, $session2);
  }
{'fraction_non_alphanumeric': 0.1549079754601227, 'fraction_numerical': 0.006134969325153374, 'mean_word_length': 3.4782608695652173, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 1, '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': '2956506', 'n_tokens_mistral': 679, 'n_tokens_neox': 644, 'n_words': 115}