Ejemplo n.º 1
0
 public function testTypicalGraphBuild()
 {
     $builder = new GraphBuilder(new MockedSimpleDictionary());
     $graph = $builder->build(new DifferenceSingleLetter());
     $this->assertInstanceOf('WordTransformer\\Graph\\Graph', $graph);
     $this->assertEquals(['год' => ['гид'], 'гид' => ['год', 'вид'], 'вид' => ['гид']], $graph->getNodes());
 }
Ejemplo n.º 2
0
 /**
  * @return Graph\Graph
  */
 private function buildGraph()
 {
     $builder = new Graph\GraphBuilder($this->dictionary);
     return $builder->build(new DifferenceSingleLetter());
 }