Ejemplo n.º 1
0
 protected function setUp()
 {
     parent::setUp();
     \Myfox\Lib\Mysql::register('default', __DIR__ . '/ini/mysql.ini');
     self::$mysql = \Myfox\Lib\Mysql::instance('default');
     self::cleanTable('default', 'task_queque');
     \Myfox\Lib\Config::register('default', __DIR__ . '/ini/myfox.ini');
 }
Ejemplo n.º 2
0
        } catch (Exception $e) {
            return array('Exception!! ' => $e->getMessage());
        }
    }
    function LoadTask($data, $fields)
    {
        try {
            $task = new Task();
            $result = $task->load($fields['TAS_UID']);
            return $result;
        } catch (Exception $e) {
            return array('Exception!! ' => $e->getMessage());
        }
    }
    function RemoveTask($data, $fields)
    {
        try {
            $task = new Task();
            $result = $task->remove($fields['TAS_UID']);
            return $result;
        } catch (Exception $e) {
            return array('Exception!! ' => $e->getMessage());
        }
    }
}
$test = new TaskTest('task.yml', $t);
$test->domain->addDomain('CREATED');
$test->load('CreateTestTasks');
$test->runAll();
$test->load('TaskUnitTest');
$test->runAll();