Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
CircularTest.php
Go to the documentation of this file.
1 <?php
7 
8 class CircularTest extends \PHPUnit\Framework\TestCase
9 {
13  protected $circular;
14 
15  protected function setUp()
16  {
17  $this->circular = new Circular();
18  }
19 
21  {
22  $dependencies = [1 => [2], 2 => [3, 5], 3 => [1], 5 => [2]];
23  $expectedCircularDependencies = [
24  1 => [[1, 2, 3, 1]],
25  2 => [[2, 3, 1, 2], [2, 5, 2]],
26  3 => [[3, 1, 2, 3]],
27  5 => [[5, 2, 5]],
28  ];
29  $this->assertEquals($expectedCircularDependencies, $this->circular->buildCircularDependencies($dependencies));
30  }
31 }