3

Im trying to get the container in my testcase.

$client = self::createPantherClient()->getContainer()

&

Error : Call to undefined method Symfony\Component\Panther\Client::getContainer()

So how do you get the container within a Panther test client?

yceruto
  • 9,230
  • 5
  • 38
  • 65
Martin-
  • 876
  • 2
  • 13
  • 30

1 Answers1

0

I'm not sure that if you cannot autowire it, you can retrieve it.

By the way, you can go like this

$client = static::createClient();
$container = $client->getContainer();

Should work

DonCallisto
  • 29,419
  • 9
  • 72
  • 100
  • 1
    If you create the container with the "normal" client, panther is creating its own container, and not possible to do what I need. – Martin- Oct 16 '18 at 08:58