public function testTypicalUsage()
 {
     $transformer = new WordTransformer(new SimpleDictionary());
     $transitions = $transformer->transform('миг', 'эра');
     $this->assertEquals(['миг', 'мир', 'мор', 'бор', 'боа', 'бра', 'эра'], $transitions);
 }
예제 #2
0
<?php

require_once __DIR__ . '/vendor/autoload.php';
use WordTransformer\WordTransformer;
use WordTransformer\Dictionary\SimpleDictionary;
$transformer = new WordTransformer(new SimpleDictionary());
$transitions = $transformer->transform('муха', 'слон');
echo join('->', $transitions);