for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Redaxscript\Tests\Model;
use Redaxscript\Model;
use Redaxscript\Tests\TestCaseAbstract;
/**
* ModuleTest
*
* @since 4.0.0
* @package Redaxscript
* @category Tests
* @author Henry Ruhs
* @covers Redaxscript\Model\Module
*/
class ModuleTest extends TestCaseAbstract
{
* setUp
public function setUp() : void
parent::setUp();
$installer = $this->installerFactory();
$installer->init();
$installer->rawCreate();
}
* tearDown
public function tearDown() : void
$this->dropDatabase();
* testCreateByArray
* @param array $createArray
* @param bool $expect
* @dataProvider providerAutoloader
public function testCreateByArray(array $createArray = [], bool $expect = null) : void
/* setup */
$moduleModel = new Model\Module();
/* actual */
$actual = $moduleModel->createByArray($createArray);
/* compare */
$this->assertEquals($expect, $actual);
* testDeleteByAlias
* @param string $moduleAlias
public function testDeleteByAlias(string $moduleAlias = null, bool $expect = null) : void
$actual = $moduleModel->deleteByAlias($moduleAlias);