<commit_before><?php

namespace Cocur\NQM\QueryLoader;

use \Mockery as m;
use Cocur\NQM\QueryLoader\Apc;

/**
 * ApcTest
 *
 * @group unit
 */
class ApcTest extends \PHPUnit_Framework_TestCase
{
    /** @var Cocur\NQM\QueryLoader\QueryLoaderInterface */
    private $loader;

    /** @var Apc */
    private $cache;

    public function setUp()
    {
        apc_clear_cache();<commit_msg>Skip APC related tests when APC is not installed<commit_after><?php

namespace Cocur\NQM\QueryLoader;

use \Mockery as m;
use Cocur\NQM\QueryLoader\Apc;

/**
 * ApcTest
 *
 * @group unit
 */
class ApcTest extends \PHPUnit_Framework_TestCase
{
    /** @var Cocur\NQM\QueryLoader\QueryLoaderInterface */
    private $loader;

    /** @var Apc */
    private $cache;

    public function setUp()
    {
        if (!function_exists('apc_clear_cache')) {
            $this->markTestSkipped('APC extension is not installed.');

            return;
        }

        if (!apc_store('nqm_test_foo', 'foobar') || apc_fetch('nqm_test_foo') !== 'foobar') {
            $this->markTestSkipped('APC extension is not working correctly.');
        }

        apc_clear_cache();
{'fraction_non_alphanumeric': 0.13096270598438856, 'fraction_numerical': 0.0, 'mean_word_length': 2.859531772575251, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '1529525', 'n_tokens_mistral': 394, 'n_tokens_neox': 388, 'n_words': 82}