/** * testUninstall * * @since 2.2.0 */ public function testUninstall() { /* setup */ $module = new Module(array('alias' => 'test')); $module->uninstall(); /* result */ Db::clearCache(); $result = Db::forPrefixTable('modules')->where('alias', 'test')->findOne(); /* compare */ $this->assertFalse(is_object($result)); }
/** * 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); }
/** * tearDownAfterClass * * @since 2.2.0 */ public static function tearDownAfterClass() { $module = new Module(array('alias' => 'call_home')); $module->uninstall(); }