<commit_before><?php

use Jralph\Notification\Notification;

class IlluminateSessionNotificationTest extends PHPUnit_Framework_TestCase {
    
    public function setUp()
    {
        parent::setUp();

        $this->store = Mockery::mock('Jralph\Notification\Contracts\Store');

        $this->notification = new Notification($this->store);
    }

    public function test_put_stores_item_in_session()
    {
        $this->store->shouldReceive('flash')->once()->andReturn(true);

        $this->assertEquals(true, $this->notification->put('key', 'my_value'));
    }

    public function test_get_returns_session_value()
    {
        $this->store->shouldReceive('get')->once()->andReturn('my_value');

        $this->assertEquals('my_value', $this->notification->get('key'));
    }

    public function test_get_returns_default_if_session_is_null()
    {
        $this->store->shouldReceive('get')->once()->andReturn(null);

        $this->assertEquals('default_value', $this->notification->get('key', 'default_value'));
    }

    public function test_has_returns_true_for_existing_key()
    {
        $this->store->shouldReceive('has')->once()->andReturn(true);

        $this->assertTrue($this->notification->has('key'));
    }

    public function test_put_works_with_tags()
    {
        $this->store->shouldReceive('get')->once()->andReturn([]);
        $this->store->shouldReceive('flash')->once()->andReturn(null);
        $this->store->shouldReceive('flash')->once()->andReturn(true);

        $this->assertTrue($this->notification->tags(['tag'])->put('key', 'my_value'));
    }

    public function test_tag_returns_keys_with_specified_tag()
    {
        $this->store->shouldReceive('get')->once()->andReturn(['key1', 'key2']);
        $this->store->shouldReceive('get')->twice()->andReturn('my_value');

        $expected = [
            'key1' => 'my_value',
            'key2' => 'my_value'
        ];

        $this->assertEquals($expected, $this->notification->tag('tag'));
    }

}<commit_msg>Fixed test to account for new default tag.<commit_after><?php

use Jralph\Notification\Notification;

class IlluminateSessionNotificationTest extends PHPUnit_Framework_TestCase {
    
    public function setUp()
    {
        parent::setUp();

        $this->store = Mockery::mock('Jralph\Notification\Contracts\Store');

        $this->notification = new Notification($this->store);
    }

    public function test_put_stores_item_in_session()
    {
        $this->store->shouldReceive('get')->once()->andReturn([]);
        $this->store->shouldReceive('flash')->twice()->andReturn(true);

        $this->assertEquals(true, $this->notification->put('key', 'my_value'));
    }

    public function test_get_returns_session_value()
    {
        $this->store->shouldReceive('get')->once()->andReturn('my_value');

        $this->assertEquals('my_value', $this->notification->get('key'));
    }

    public function test_get_returns_default_if_session_is_null()
    {
        $this->store->shouldReceive('get')->once()->andReturn(null);

        $this->assertEquals('default_value', $this->notification->get('key', 'default_value'));
    }

    public function test_has_returns_true_for_existing_key()
    {
        $this->store->shouldReceive('has')->once()->andReturn(true);

        $this->assertTrue($this->notification->has('key'));
    }

    public function test_put_works_with_tags()
    {
        $this->store->shouldReceive('get')->once()->andReturn([]);
        $this->store->shouldReceive('flash')->once()->andReturn(null);
        $this->store->shouldReceive('flash')->once()->andReturn(true);

        $this->assertTrue($this->notification->tags(['tag'])->put('key', 'my_value'));
    }

    public function test_tag_returns_keys_with_specified_tag()
    {
        $this->store->shouldReceive('get')->once()->andReturn(['key1', 'key2']);
        $this->store->shouldReceive('get')->twice()->andReturn('my_value');

        $expected = [
            'key1' => 'my_value',
            'key2' => 'my_value'
        ];

        $this->assertEquals($expected, $this->notification->tag('tag'));
    }

}
{'fraction_non_alphanumeric': 0.18757583110895415, 'fraction_numerical': 0.001941276389225916, 'mean_word_length': 3.5902004454342986, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 127, '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': '6857430', 'n_tokens_mistral': 1226, 'n_tokens_neox': 1181, 'n_words': 132}