We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Best practice in controller unit testing

Hello! I am newbie php/phalcon developer with background in python/django development. I have read this doc https://docs.phalcon.io/en/latest/reference/unit-testing.html In the section "Sample unit test", was given example: <?php

namespace Test;

/**

  • Class UnitTest */ class UnitTest extends \UnitTestCase {

public function testTestCase() {

$this->assertEquals('works', 'works', 'This is OK' );

$this->assertEquals('works', 'works1', 'This wil fail' ); } }

It is not very helpfull, for controllers unit testing. So, i am interested, do the phalcon has some "best practices" in conntrollers testing? It would be perfect to get some code snipets.

Kind regards.