<?php
require(dirname(__FILE__) . '/../../../../../Tests/config.php');

/**
 * Test class for Analyst.
 * Generated by PHPUnit on 2011-02-21 at 01:40:36.
 */
class AnalystPtTest extends PHPUnit_Framework_TestCase {

	/**
	 * @var Analyst
	 */
	protected $object;

	/**
	 * Sets up the fixture, for example, opens a network connection.
	 * This method is called before a test is executed.
	 */
	protected function setUp() {
		// you gotta set the idiom simply to start some required variables
		// once these tests wont use the idiom as a key subject
		MindProject::loadIdiom('en');
		Mind::$langPath= dirname(__FILE__) . '/../../../../../mind3rd/API/languages/en/';
		Mind::$lexer= new Lexer();
		$this->object = new Analyst;
	}

	/**
	 * Tears down the fixture, for example, closes a network connection.
	 * This method is called afhas a test is executed.
	 */
	protected function tearDown() {

	}

	/**
	 * the used words doesn't metter here, the main spine is the keys group,
	 * so, it doesn't metter what language is set
	 */
	public function testAnalize1() {
		$this->assertEquals($this->object->analize(
								Array
								('teacher', '', 'has', '', '', '', 'student'),
								'SQVNONS',
								Array
								(2, 128, 1, 8, 16, 32, 2)),
							Array('min'=>1,
								  'max'=>'n',
								  'linkType'=>'possibility',
								  'linkVerb'=>'has',
								  'rel'=>'student',
								  'focus'=>'teacher'));
	}
	public function testAnalize2() {
		$this->assertEquals($this->object->analize(
								Array
								('teacher', '', 'has', '', '', '', 'student'),
								'SQVNONS',
								Array
								(2, 64, 1, 8, 16, 32, 2)),
							Array('min'=>1,
								  'max'=>'n',
								  'linkType'=>'must',
								  'linkVerb'=>'has',
								  'rel'=>'student',
								  'focus'=>'teacher'));
	}
	public function testAnalize3() {
		$this->assertEquals($this->object->analize(
								Array
								('teacher', '', 'have', '', '', '', 'student'),
								'SQVNONS',
								Array
								(2, 128, 1, 4, 16, 8, 2)),
							Array('min'=>0,
								  'max'=>1,
								  'linkType'=>'possibility',
								  'linkVerb'=>'have',
								  'rel'=>'student',
								  'focus'=>'teacher'));
	}
	public function testAnalize4() {
		$this->assertEquals($this->object->analize(
								Array
								('teacher', 'have', '', '', '', 'student'),
								'SQVNONS',
								Array
								(2, 1, 4, 16, 8, 2)),
							Array('min'=>0,
								  'max'=>1,
								  'linkType'=>'action',
								  'linkVerb'=>'have',
								  'rel'=>'student',
								  'focus'=>'teacher'));
	}
	public function testAnalize5() {
		$this->assertEquals($this->object->analize(
								Array
								('teacher', 'has', '', '', '', 'student'),
								'SQVNONS',
								Array
								(2, 1, 8, 16, 32, 2)),
							Array('min'=>1,
								  'max'=>'n',
								  'linkType'=>'action',
								  'linkVerb'=>'has',
								  'rel'=>'student',
								  'focus'=>'teacher'));
	}
	public function testAnalize6() {
		$this->assertEquals($this->object->analize(
								Array
								('teachera', 'has', '', '', '', 'aluna'),
								'SQVNONS',
								Array
								(2, 1, 4, 16, 32, 2)),
							Array('min'=>0,
								  'max'=>'n',
								  'linkType'=>'action',
								  'linkVerb'=>'has',
								  'rel'=>'aluna',
								  'focus'=>'teachera'));
	}
	public function testAnalize7() {
		$this->assertEquals($this->object->analize(
								Array
								('teacher', 'has', '', 'student'),
								'SQVNONS',
								Array
								(2, 1, 32, 2)),
							Array('min'=>0,
								  'max'=>'n',
								  'linkType'=>'action',
								  'linkVerb'=>'has',
								  'rel'=>'student',
								  'focus'=>'teacher'));
	}
	public function testAnalize8() {
		$this->assertEquals($this->object->analize(
								Array
								('teacher', 'has', '', 'student'),
								'SQVNONS',
								Array
								(2, 1, 8, 2)),
							Array('min'=>0,
								  'max'=>1,
								  'linkType'=>'action',
								  'linkVerb'=>'has',
								  'rel'=>'student',
								  'focus'=>'teacher'));
	}
	public function testAnalize9() {
		$this->assertEquals($this->object->analize(
								Array
								('teacher', '', 'has', '', 'student'),
								'SQVNONS',
								Array
								(2, 64, 1, 8, 2)),
							Array('min'=>1,
								  'max'=>1,
								  'linkType'=>'must',
								  'linkVerb'=>'has',
								  'rel'=>'student',
								  'focus'=>'teacher'));
	}
	public function testAnalize10() {
		$this->assertEquals($this->object->analize(
								Array
								('teacher', '', 'has', '', 'student'),
								'SQVNONS',
								Array
								(2, 128, 1, 32, 2)),
							Array('min'=>0,
								  'max'=>'n',
								  'linkType'=>'possibility',
								  'linkVerb'=>'has',
								  'rel'=>'student',
								  'focus'=>'teacher'));
	}
}

