<commit_before><?php
/*
 * This file is part of PHPComponent/DI.
 *
 * Copyright (c) 2016 <NAME> <<EMAIL>>
 *
 * For the full copyright and license information, please view the "LICENSE.md"
 * file that was distributed with this source code.
 */

namespace PHPComponent\DI\Test;

use PHPComponent\DI\Container;
use PHPComponent\DI\Helpers;
use PHPComponent\DI\ParametersBag;
use PHPComponent\DI\Reference\ServiceReference;

/**
 * @author <NAME> <<EMAIL>>
 */
class HelpersTest extends \PHPUnit_Framework_TestCase
{

    /**
     * @dataProvider getValues
     * @param mixed $class
     * @param string $class_name
     * @param bool $valid
     */
    public function testIsClassTypeOf($class, $class_name, $valid)
    {
        $this->assertSame($valid, Helpers::isClassTypeOf($class, $class_name));
    }

    public function getValues()
    {
        return array(
            array(\Exception::class, \Throwable::class, true),
            array(\InvalidArgumentException::class, \LogicException::class, true),
            array(new \stdClass(), \Traversable::class, false),
            array(\stdClass::class, \Traversable::class, false),
            array(new \stdClass(), 'stdClass', true),<commit_msg>Repaired HelpersTest<commit_after><?php
/*
 * This file is part of PHPComponent/DI.
 *
 * Copyright (c) 2016 <NAME> <<EMAIL>>
 *
 * For the full copyright and license information, please view the "LICENSE.md"
 * file that was distributed with this source code.
 */

namespace PHPComponent\DI\Test;

use PHPComponent\DI\Container;
use PHPComponent\DI\Helpers;
use PHPComponent\DI\ParametersBag;
use PHPComponent\DI\Reference\ServiceReference;

/**
 * @author <NAME> <<EMAIL>>
 */
class HelpersTest extends \PHPUnit_Framework_TestCase
{

    /**
     * @dataProvider getValues
     * @param mixed $class
     * @param string $class_name
     * @param bool $valid
     */
    public function testIsClassTypeOf($class, $class_name, $valid)
    {
        $this->assertSame($valid, Helpers::isClassTypeOf($class, $class_name));
    }

    public function getValues()
    {
        return array(
            array(\LogicException::class, \Exception::class, true),
            array(\InvalidArgumentException::class, \LogicException::class, true),
            array(new \stdClass(), \Traversable::class, false),
            array(\stdClass::class, \Traversable::class, false),
            array(new \stdClass(), 'stdClass', true),
{'fraction_non_alphanumeric': 0.13075657894736842, 'fraction_numerical': 0.003289473684210526, 'mean_word_length': 3.329181494661922, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, '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': '1740478', 'n_tokens_mistral': 710, 'n_tokens_neox': 699, 'n_words': 178}