<commit_before><?php declare(strict_types=1);

namespace Rector\NodeTypeResolver\Tests\PerNodeTypeResolver\AssignTypeResolver;

use PhpParser\Node\Expr\Variable;
use Rector\Node\Attribute;
use Rector\NodeTypeResolver\Tests\AbstractNodeTypeResolverTest;

final class AssignTypeResolverTest extends AbstractNodeTypeResolverTest
{
    public function testNew(): void
    {
        $variableNodes = $this->getNodesForFileOfType(__DIR__ . '/Source/MethodCall.php.inc', Variable::class);

        $this->assertSame(
            ['Nette\Config\Configurator', 'Nette\Object'],
            $variableNodes[0]->getAttribute(Attribute::TYPES)
        );

        $this->assertSame(
            ['Nette\Config\Configurator', 'Nette\Object'],
            $variableNodes[2]->getAttribute(Attribute::TYPES)
        );
    }

    public function testNewTwo(): void
    {
        $variableNodes = $this->getNodesForFileOfType(__DIR__ . '/Source/New.php.inc', Variable::class);

        $this->assertSame(
            'Symfony\Component\DependencyInjection\ContainerBuilder',
            $variableNodes[0]->getAttribute(Attribute::TYPES)[0]
        );

        $this->assertSame(
            'Symfony\Component\DependencyInjection\ContainerBuilder',
            $variableNodes[1]->getAttribute(Attribute::TYPES)[0]
        );
    }

    public function testMethodCall(): void
    {
        $variableNodes = $this->getNodesForFileOfType(__DIR__ . '/Source/MethodCall.php.inc', Variable::class);

        $this->assertSame(
            ['Nette\DI\Container'],
            $variableNodes[1]->getAttribute(Attribute::TYPES)
        );
    }
}<commit_msg>update tests<commit_after><?php declare(strict_types=1);

namespace Rector\NodeTypeResolver\Tests\PerNodeTypeResolver\AssignTypeResolver;

use PhpParser\Node\Expr\Variable;
use Rector\Node\Attribute;
use Rector\NodeTypeResolver\Tests\AbstractNodeTypeResolverTest;

final class AssignTypeResolverTest extends AbstractNodeTypeResolverTest
{
    public function testNew(): void
    {
        $variableNodes = $this->getNodesForFileOfType(__DIR__ . '/Source/MethodCall.php.inc', Variable::class);

        $this->assertSame(
            ['Nette\Config\Configurator', 'Nette\Object'],
            $this->nodeTypeResolver->resolve($variableNodes[0])
        );

        $this->assertSame(
            ['Nette\Config\Configurator', 'Nette\Object'],
            $this->nodeTypeResolver->resolve($variableNodes[2])
        );
    }

    public function testNewTwo(): void
    {
        $variableNodes = $this->getNodesForFileOfType(__DIR__ . '/Source/New.php.inc', Variable::class);

        $this->assertSame(
            'Symfony\Component\DependencyInjection\ContainerBuilder',
            $this->nodeTypeResolver->resolve($variableNodes[0])[0]
        );

        $this->assertSame(
            'Symfony\Component\DependencyInjection\ContainerBuilder',
            $this->nodeTypeResolver->resolve($variableNodes[1])[0]
        );
    }

    public function testMethodCall(): void
    {
        $variableNodes = $this->getNodesForFileOfType(__DIR__ . '/Source/MethodCall.php.inc', Variable::class);

        $this->assertSame(
            ['Nette\DI\Container'],
            $this->nodeTypeResolver->resolve($variableNodes[1])
        );
    }
}
{'fraction_non_alphanumeric': 0.13359828798532558, 'fraction_numerical': 0.004891470498318557, 'mean_word_length': 3.074719800747198, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 34, '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': '835838', 'n_tokens_mistral': 925, 'n_tokens_neox': 915, 'n_words': 113}