wushu06
2/15/2020 - 8:43 PM

Magento 2 test unit main functions

<?php 


namespace Mageplaza\HelloWorld\Test\Unit\Model;
 
 
class PostTest extends \PHPUnit_Framework_TestCase {

    /**
     * Is called once before running all test in class
     */
    static function setUpBeforeClass()
    {
        
    }

    /**
     * Is called once after running all test in class
     */
    static function tearDownAfterClass()
    {
        
    }

    /**
     * Is called before running a test
     */
    protected function setUp()
    {
        
    }

    /**
     * Is called after running a test
     */
    protected function tearDown()
    {
        
    }

    /**
     * The test itself, every test function must start with 'test'
     */
    public function testTest()
    {
        $this->assertTrue(false);
    }
}