public function testTypicalUsage() { $transformer = new WordTransformer(new SimpleDictionary()); $transitions = $transformer->transform('миг', 'эра'); $this->assertEquals(['миг', 'мир', 'мор', 'бор', 'боа', 'бра', 'эра'], $transitions); }
<?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);