Skip to content

Another TestContainer issue #216

Closed
@b1rdex

Description

@b1rdex

This is a continuation of a problem described in #27, #210 and #212.

class ApartmentSubwaysTest extends \Symfony\Bundle\FrameworkBundle\Test\WebTestCase
{
	public function testFoo(): void
	{
		static::createClient()->getContainer()->get(UserRepository::class);
	}
}

\Symfony\Bundle\FrameworkBundle\KernelBrowser::getContainer():

/**
 * Returns the container.
 *
 * @return ContainerInterface
 */
public function getContainer()
{
    $container = $this->kernel->getContainer();

    return $container->has('test.service_container') ? $container->get('test.service_container') : $container;
}

So there should be one more stub added for KernelBrowser::getContainer()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions