<commit_before><?php

namespace jtreminio\Zimple\Tests;

use jtreminio\Zimple\Zimple as Container;

class ContainerTest extends \PHPUnit_Framework_TestCase
{
    /**
     * Override service container
     *
     * @param string $name    Name of service to replace: "\Namespace\Component\UserIdentity"
     * @param mixed  $service Value to replace service with - usually a PHPUnit mock object
     * @param bool   $final   Whether to mark service as final, prevent overrides
     * @return self
     */
    protected final function setService($name, $service, $final = true)
    {
        Container::set($name, $service, $final);

        return $this;
    }

    public function tearDown()
    {
        Container::clear();
    }

    public function testGetReturnsService()
    {
        $uniqId = uniqid();
        $string = 'it works!';

        $this->setService($uniqId, $string);

        $this->assertEquals(<commit_msg>Renamed class to ZimpleTest to match new name<commit_after><?php

namespace jtreminio\Zimple\Tests;

use jtreminio\Zimple\Zimple as Container;

class ZimpleTest extends \PHPUnit_Framework_TestCase
{
    /**
     * Override service container
     *
     * @param string $name    Name of service to replace: "\Namespace\Component\UserIdentity"
     * @param mixed  $service Value to replace service with - usually a PHPUnit mock object
     * @param bool   $final   Whether to mark service as final, prevent overrides
     * @return self
     */
    protected final function setService($name, $service, $final = true)
    {
        Container::set($name, $service, $final);

        return $this;
    }

    public function tearDown()
    {
        Container::clear();
    }

    public function testGetReturnsService()
    {
        $uniqId = uniqid();
        $string = 'it works!';

        $this->setService($uniqId, $string);

        $this->assertEquals(
{'fraction_non_alphanumeric': 0.10291777188328913, 'fraction_numerical': 0.0, 'mean_word_length': 2.727272727272727, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '6603449', 'n_tokens_mistral': 545, 'n_tokens_neox': 526, 'n_words': 158}