コード例 #1
0
ファイル: TinyTest.php プロジェクト: villav/tiny-php
 public function testGenerateRandomSetsWork()
 {
     for ($i = 0; $i <= 1000; $i++) {
         $tiny = new Tiny(Tiny::generate_set());
         $this->assertEquals($tiny->from($tiny->to($i)), $i);
     }
 }
コード例 #2
0
 /**
  * Do the tiny conversion.
  * @param string $text
  */
 public function tiny($id)
 {
     return $this->tiny->to($id);
 }
コード例 #3
0
ファイル: TinyStrategy.php プロジェクト: UseMuffin/Obfuscate
 /**
  * {@inheritdoc}
  *
  * @param string $str String to obfuscate.
  * @return string
  */
 public function obfuscate($str)
 {
     return $this->_tiny->to($str);
 }