I encounter a problem with symfony's testing.
Here is my action source code:
public function indexAction()
{
$yac = new \Yac();
return new JsonResponse($yac->info());
}
And this is my testing source code:
public function testIndex()
{
$client = static::createClient();
$client->request('GET', 'http://admin.yjj.com/');
}
Position A get false, when using phpunit
to test. The screenshot is below:
But it's normal when using browser. The result:
{
"memory_size": 71303168,
"slots_memory_size": 4194304,
"values_memory_size": 67108864,
"segment_size": 4194304,
"segment_num": 16,
"miss": 0,
"hits": 0,
"fails": 0,
"kicks": 0,
"recycles": 0,
"slots_size": 32768,
"slots_used": 0
}
So, I don't know what difference between symfony's testing and browser.
Or, this is the problem of Yac extension?
Aucun commentaire:
Enregistrer un commentaire