init() public method

init the class
Since: 2.4.0
public init ( array $moduleArray = [] )
$moduleArray array custom module setup
 /**
  * testUninstall
  *
  * @since 2.2.0
  */
 public function testUninstall()
 {
     /* setup */
     $module = new Module();
     $module->init(array('alias' => 'Test'));
     $module->uninstall();
     /* actual */
     $actual = Db::forTablePrefix('modules')->where('alias', 'Test')->findOne();
     /* compare */
     $this->assertFalse(is_object($actual));
 }
 /**
  * testUninstall
  *
  * @since 2.6.0
  */
 public function testUninstall()
 {
     /* setup */
     $module = new Module();
     $module->init(array('alias' => 'TestDummy'));
     $module->uninstall();
     /* actual */
     $actualModules = Db::forTablePrefix('modules')->findMany()->count();
     $actualTables = Db::countTablePrefix();
     /* compare */
     $this->assertEquals(1, $actualModules);
     $this->assertEquals(8, $actualTables);
 }