<commit_before><?php
namespace BEAR\Package\Provide\ApplicationLogger\ResourceLog\Writer;

require_once __DIR__ . '/Mock.php';

class Zf2LogTest extends \PHPUnit_Framework_TestCase
{
    /**
     * @var \BEAR\Package\Provide\ApplicationLogger\ResourceLog\Writer\Zf2Log
     */
    private $zf2Logger;

    /**
     * @var Mock
     */
    private $ro;

    protected function setUp()
    {
        parent::setUp();
        $this->zf2Logger = new \BEAR\Package\Provide\ApplicationLogger\ResourceLog\Writer\Zf2Log(new Zf2LogProvider(__DIR__));
        $this->request = require $GLOBALS['_BEAR_TEST_DIR'] . '/scripts/instance/request.php';
        $this->ro = new Mock;
        $this->request->set(new Mock, 'nop://mock', 'get', []);
        $this->ro->onGet(1, 2);
    }

    protected function tearDown()
    {
        parent::tearDown();
        @unlink(__DIR__ . '/resource.db');
        unset($_SERVER['PATH_INFO']);
    }

    public function testNew()
    {
        $this->assertInstanceOf('\BEAR\Package\Provide\ApplicationLogger\ResourceLog\Writer\Zf2Log', $this->zf2Logger);
    }

    public function testWrite()<commit_msg>keep test db file to pass the test<commit_after><?php
namespace BEAR\Package\Provide\ApplicationLogger\ResourceLog\Writer;

require_once __DIR__ . '/Mock.php';

class Zf2LogTest extends \PHPUnit_Framework_TestCase
{
    /**
     * @var \BEAR\Package\Provide\ApplicationLogger\ResourceLog\Writer\Zf2Log
     */
    private $zf2Logger;

    /**
     * @var Mock
     */
    private $ro;

    protected function setUp()
    {
        parent::setUp();
        $this->zf2Logger = new \BEAR\Package\Provide\ApplicationLogger\ResourceLog\Writer\Zf2Log(new Zf2LogProvider(__DIR__));
        $this->request = require $GLOBALS['_BEAR_TEST_DIR'] . '/scripts/instance/request.php';
        $this->ro = new Mock;
        $this->request->set(new Mock, 'nop://mock', 'get', []);
        $this->ro->onGet(1, 2);
    }

    protected function tearDown()
    {
        parent::tearDown();
        unset($_SERVER['PATH_INFO']);
    }

    public function testNew()
    {
        $this->assertInstanceOf('\BEAR\Package\Provide\ApplicationLogger\ResourceLog\Writer\Zf2Log', $this->zf2Logger);
    }

    public function testWrite()
{'fraction_non_alphanumeric': 0.14852809991079394, 'fraction_numerical': 0.008920606601248885, 'mean_word_length': 2.9213286713286712, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 21, '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': '6990455', 'n_tokens_mistral': 728, 'n_tokens_neox': 719, 'n_words': 112}