I would like to do phpUnit covers of my project actions .
I already covered models.
Does anybody know, how cover actions or where I can read about that?
Ok, I resolved it.
I use Guzzle for this.
If somebody want knows how to do it I show my example code.
Install Guzzle. Add to your composer.json next "guzzle/guzzle":"~3.9" or use php composer.phar require guzzle/guzzle:~3.9
class UserControllerTest extends \UnitTestCase
* @covers Controllers\UserController::loginAction
public function testLoginAction()
$client = new \Guzzle\Http\Client();
$nickname = 'User nickName';
$data = array(
'nickname' => $nickname,
'avatarNumber' => 5,
'tagLine' => 'a test dev!'
$request = $client->post('https://my_site_url/api/user/login', null, $data);
$response = $request->send();
It is simple example :)
That is all.