vendredi 16 octobre 2015

laravel with codeception unitTesting : can't check return echo when using assertEquals()

environment 

  • laravel 5.0.33
  • codeception 2.0.16

App/helpers.php

function sample($message)
{
  echo $message;
}

tests/herpersTest.php

function testsample()
{
  $this->assertEquals('○○○○',sample('test'));
}

I want to check echo, but i cant check echo and print.
I know only return check.

What am I doing wrong?



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1LpLSFB
via IFTTT

Aucun commentaire:

Enregistrer un commentaire