<commit_before><?php

namespace AssetManagerTest\Service;

use Assetic\Asset\StringAsset;
use PHPUnit_Framework_TestCase;
use AssetManager\Service\AssetFilterManager;
use Zend\ServiceManager\ServiceManager;

class AssetFilterManagerTest extends PHPUnit_Framework_TestCase
{
    /**
     * {@inheritDoc}
     */
    public function setUp()
    {
        require_once __DIR__ . '/../../_files/CustomFilter.php';
    }

    public function testensureByService()
    {
        $assetFilterManager = new AssetFilterManager(array(
            'test/path.test' => array(
                array(<commit_msg>Added test for nullable filters.<commit_after><?php

namespace AssetManagerTest\Service;

use Assetic\Asset\StringAsset;
use PHPUnit_Framework_TestCase;
use AssetManager\Service\AssetFilterManager;
use Zend\ServiceManager\ServiceManager;

class AssetFilterManagerTest extends PHPUnit_Framework_TestCase
{
    /**
     * {@inheritDoc}
     */
    public function setUp()
    {
        require_once __DIR__ . '/../../_files/CustomFilter.php';
    }

    public function testNulledValuesAreSkipped()
    {
        $assetFilterManager = new AssetFilterManager(array(
	    'test/path.test' => array(
	        'null_filters' => null
	    )
        ));
	
	    $asset = new StringAsset('Herp Derp');

    	$assetFilterManager->setFilters('test/path.test', $asset);

	    $this->assertEquals('called', $asset->dump());
    }

    public function testensureByService()
    {
        $assetFilterManager = new AssetFilterManager(array(
            'test/path.test' => array(
                array(
{'fraction_non_alphanumeric': 0.11047979797979798, 'fraction_numerical': 0.0, 'mean_word_length': 3.0433673469387754, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 10, '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': '5560647', 'n_tokens_mistral': 464, 'n_tokens_neox': 440, 'n_words': 83}