Arquivos
wMind/Tests/mind3rd/API/languages/pt/VerbalizerTest.php
T
2011-03-15 12:36:46 -03:00

181 linhas
5.4 KiB
PHP
Arquivo Executável

<?php
require_once dirname(__FILE__) . '/../../../../../mind3rd/API/classes/Mind.php';
require_once dirname(__FILE__) . '/../../../../../mind3rd/API/languages/pt/Verbalizer.php';
/**
* Test class for pt\Verbalizer.
* Generated by PHPUnit on 2010-12-17 at 22:16:50.
*/
class VerbalizerTest extends PHPUnit_Framework_TestCase {
/**
* @var pt\Verbalizer
*/
protected $object;
/**
* Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed.
*/
protected function setUp() {
$this->object = new pt\Verbalizer;
}
/**
* Tears down the fixture, for example, closes a network connection.
* This method is called after a test is executed.
*/
protected function tearDown() {
}
/* NOTE: we wont be testing any first person verb flection
* because such rules are commented on the main class as
* mind3rd wont treat such sentences
*/
public function testIsVerb() {
$this->assertTrue(pt\Verbalizer::isVerb('correr'));
}
public function testIsVerb1() {
$this->assertTrue(pt\Verbalizer::isVerb('nadar'));
}
public function testIsVerb2() {
$this->assertTrue(pt\Verbalizer::isVerb('nadam'));
}
public function testIsVerb3() {
$this->assertTrue(pt\Verbalizer::isVerb('ministrarão'));
}
public function testIsVerb4() {
$this->assertTrue(pt\Verbalizer::isVerb('apresentar'));
}
public function testIsVerb5() {
$this->assertTrue(pt\Verbalizer::isVerb('sobrescreve'));
}
public function testIsVerb6() {
$this->assertTrue(pt\Verbalizer::isVerb('lerão'));
}
public function testIsVerb7() {
$this->assertTrue(pt\Verbalizer::isVerb('correm'));
}
public function testIsVerb8() {
$this->assertTrue(pt\Verbalizer::isVerb('ministrarão'));
}
public function testIsVerb9() {
$this->assertTrue(pt\Verbalizer::isVerb('tomarão'));
}
public function testIsVerb10() {
$this->assertTrue(pt\Verbalizer::isVerb('comerá'));
}
public function testIsVerb11() {
$this->assertTrue(pt\Verbalizer::isVerb('bebe'));
}
public function testIsVerb12() {
$this->assertTrue(pt\Verbalizer::isVerb('toma'));
}
public function testIsVerb13() {
$this->assertTrue(pt\Verbalizer::isVerb('come'));
}
public function testIsVerb14() {
$this->assertTrue(pt\Verbalizer::isVerb('tomará'));
}
public function testIsVerb15() {
$this->assertTrue(pt\Verbalizer::isVerb('comerá'));
}
public function testIsVerb17() {
$this->assertTrue(pt\Verbalizer::isVerb('levantar'));
}
public function testIsVerb18() {
$this->assertFalse(pt\Verbalizer::isVerb('abajur'));
}
public function testIsVerb19() {
$this->assertFalse(pt\Verbalizer::isVerb('cadeira'));
}
public function testIsVerb20() {
$this->assertFalse(pt\Verbalizer::isVerb('violão'));
}
public function testIsVerb21() {
$this->assertTrue(pt\Verbalizer::isVerb('falhar'));
}
public function testIsVerb22() {
$this->assertTrue(pt\Verbalizer::isVerb('falharão'));
}
public function testIsVerb23() {
$this->assertTrue(pt\Verbalizer::isVerb('falhar'));
}
public function testIsVerb24() {
$this->assertTrue(pt\Verbalizer::isVerb('falhou'));
}
public function testIsVerb25() {
$this->assertTrue(pt\Verbalizer::isVerb('comenta'));
}
public function testIsVerb26() {
$this->assertTrue(pt\Verbalizer::isVerb('comentará'));
}
public function testIsVerb27() {
$this->assertTrue(pt\Verbalizer::isVerb('comentarão'));
}
public function testIsVerb28() {
$this->assertTrue(pt\Verbalizer::isVerb('correu'));
}
public function testIsVerb29() {
$this->assertTrue(pt\Verbalizer::isVerb('correrás'));
}
public function testIsVerb30() {
$this->assertTrue(pt\Verbalizer::isVerb('falhará'));
}
public function testIsVerb31() {
$this->assertTrue(pt\Verbalizer::isVerb('comeu'));
}
public function testIsVerb32() {
$this->assertFalse(pt\Verbalizer::isVerb('professor'));
}
// testing the toInfinitive method
// NOTICE that its goals is about the present/future words...
// past is not supported
public function testToInfinitive1() {
$this->assertEquals('saber', pt\Verbalizer::toInfinitive('sei'));
}
public function testToInfinitive2() {
$this->assertEquals('poderá', pt\Verbalizer::toInfinitive('poderá'));
}
public function testToInfinitive3() {
$this->assertEquals('amar', pt\Verbalizer::toInfinitive('ama'));
}
public function testToInfinitive4() {
$this->assertEquals('correr', pt\Verbalizer::toInfinitive('corre'));
}
public function testToInfinitive5() {
$this->assertEquals('correr', pt\Verbalizer::toInfinitive('correm'));
}
public function testToInfinitive6() {
$this->assertEquals('lavar', pt\Verbalizer::toInfinitive('lavam'));
}
public function testToInfinitive7() {
$this->assertEquals('ministrar', pt\Verbalizer::toInfinitive('ministram'));
}
public function testToInfinitive8() {
$this->assertEquals('ter', pt\Verbalizer::toInfinitive('terão'));
}
public function testToInfinitive9() {
$this->assertEquals('alimentar', pt\Verbalizer::toInfinitive('alimentarão'));
}
public function testToInfinitive10() {
$this->assertEquals('pôr', pt\Verbalizer::toInfinitive('põe'));
}
public function testToInfinitive11() {
$this->assertEquals('colocar', pt\Verbalizer::toInfinitive('colocarão'));
}
public function testToInfinitive12() {
$this->assertEquals('varrer', pt\Verbalizer::toInfinitive('varrer'));
}
public function testToInfinitive13() {
$this->assertEquals('poder', pt\Verbalizer::toInfinitive('pode'));
}
}
?>