示例#1
0
 public function testGetName()
 {
     $pigLatin = new \Dahc14\PigLatin\CPigLatin();
     $expect = "anielDay";
     $word = "Daniel";
     $result = $pigLatin->word2PigLatin($word);
     $this->assertEquals($result, $expect, "The translation is not correct.");
 }
示例#2
0
文件: test.php 项目: dahc14/cpiglatin
<?php

include '../../autoloader.php';
$pigLatin = new \Dahc14\PigLatin\CPigLatin();
?>

<!doctype html>
<meta charset=utf8>
<title>CPigLatin Example</title>
<h1>CPigLatin Example</h1>
<p>
	<?php 
$word = "Daniel";
echo $word . " becomes " . $pigLatin->word2PigLatin($word);
?>
</p>