<commit_before><?php

namespace Meinhof\Tests\Helper;

use Meinhof\Helper\UrlHelper;

class TestModel
{
    protected $withUrl;

    public function __construct($withUrl)
    {
        $this->withUrl = $withUrl;
    }

    public function getUrl()
    {
        if ($this->withUrl) {
            return '{info.slug}.html';
        }
    }

    public function getInfo()
    {
        return array('slug'=>'test');
    }
}

class UrlHelperTest extends \PHPUnit_Framework_TestCase
{
    protected $helper;

    public function setUp()
    {
        $this->helper = new UrlHelper('{prefix}/{locale}/{info.slug}.html', array('prefix'=>'..'));
    }

    /**
     * @expectedException \RuntimeException<commit_msg>fixed test<commit_after><?php

namespace Meinhof\Tests\Helper;

use Meinhof\Helper\UrlHelper;

class TestModel
{
    protected $withUrl;

    public function __construct($withUrl)
    {
        $this->withUrl = $withUrl;
    }

    public function getViewUrl()
    {
        if ($this->withUrl) {
            return '{info.slug}.html';
        }
    }

    public function getInfo()
    {
        return array('slug'=>'test');
    }
}

class UrlHelperTest extends \PHPUnit_Framework_TestCase
{
    protected $helper;

    public function setUp()
    {
        $this->helper = new UrlHelper('{prefix}/{locale}/{info.slug}.html', array('prefix'=>'..'));
    }

    /**
     * @expectedException \RuntimeException
{'fraction_non_alphanumeric': 0.142353770260747, 'fraction_numerical': 0.0, 'mean_word_length': 2.514851485148515, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, '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': '1357829', 'n_tokens_mistral': 439, 'n_tokens_neox': 440, 'n_words': 82}