fixed problems with some unitTest classes
Esse commit está contido em:
+23
-1
@@ -1,5 +1,6 @@
|
||||
<?php
|
||||
require_once dirname(__FILE__) . '/../mind3rd/API/classes/Mind.php';
|
||||
require_once dirname(__FILE__) . '/../mind3rd/API/classes/MindSpeaker.php';
|
||||
require_once dirname(__FILE__) . '/../mind3rd/API/cortex/Darwin/Darwin.php';
|
||||
require_once dirname(__FILE__) . '/../mind3rd/API/cortex/Lexer/Lexer.php';
|
||||
require_once dirname(__FILE__) . '/../mind3rd/API/cortex/canonic/Canonic.php';
|
||||
@@ -17,4 +18,25 @@
|
||||
require_once dirname(__FILE__) . '/../mind3rd/API/cortex/analyst/Normalizer.php';
|
||||
require_once dirname(__FILE__) . '/../mind3rd/API/cortex/analyst/Analyst.php';
|
||||
require_once dirname(__FILE__) . '/../mind3rd/API/cortex/tokenizer/Token.php';
|
||||
require_once dirname(__FILE__) . '/../mind3rd/API/cortex/tokenizer/Tokenizer.php';
|
||||
require_once dirname(__FILE__) . '/../mind3rd/API/cortex/tokenizer/Tokenizer.php';
|
||||
|
||||
if(!class_exists('MindForUnitTest'))
|
||||
{
|
||||
class MindForUnitTest
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
$this->defaults= Array(
|
||||
'pk_prefix'=>'pk_',
|
||||
'fk_prefix'=>'fk_'
|
||||
);
|
||||
}
|
||||
}
|
||||
$_MIND= new MindForUnitTest();
|
||||
}
|
||||
|
||||
/*if(!defined('_MINDSRC_'))
|
||||
define('_MINDSRC_', dirname(__FILE__).'/..');
|
||||
if(!defined('_CONSOLE_LINE_LENGTH_'))
|
||||
define('_CONSOLE_LINE_LENGTH_', 80);
|
||||
$_MIND= new Mind();*/
|
||||
@@ -173,7 +173,7 @@
|
||||
$this->about= parse_ini_file($path.ABOUT_INI);
|
||||
$this->defaults= parse_ini_file($path.DEFAULTS_INI);
|
||||
$this->conf= parse_ini_file($path.MIND_CONF);
|
||||
include($path.L10N_DIR.$this->defaults['default_human_language'].'.php');
|
||||
require_once($path.L10N_DIR.$this->defaults['default_human_language'].'.php');
|
||||
Mind::$curLang= $this->defaults['default_human_languageName'];
|
||||
Mind::$l10n= new $this->defaults['default_human_language']();
|
||||
Mind::$langPath= $path.LANG_PATH;
|
||||
|
||||
@@ -126,7 +126,6 @@
|
||||
public static function setUpKeys()
|
||||
{
|
||||
GLOBAL $_MIND;
|
||||
|
||||
foreach(Analyst::$entities as &$entity)
|
||||
{
|
||||
$pkPrefix= $_MIND->defaults['pk_prefix'];
|
||||
@@ -176,14 +175,29 @@
|
||||
}
|
||||
}
|
||||
|
||||
public static function reset()
|
||||
{
|
||||
self::$oneByOne = false;
|
||||
self::$oneByOne = Array();
|
||||
self::$nByN = false;
|
||||
self::$nByN = Array();
|
||||
self::$oneByN = false;
|
||||
self::$oneByN = Array();
|
||||
self::$focus = false;
|
||||
self::$focus = Array();
|
||||
self::$predicate= false;
|
||||
self::$predicate= Array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Normalizes the known structure
|
||||
*/
|
||||
public static function normalize()
|
||||
{
|
||||
self::reset();
|
||||
self::separateByRelationQuantifiers(); // ok
|
||||
self::fixOneByOneRel(); // ok
|
||||
self::fixNByNRel(); // ok
|
||||
self::setUpKeys();
|
||||
self::setUpKeys(); // ok
|
||||
}
|
||||
}
|
||||
Referência em uma Nova Issue
Bloquear um usuário