Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
ModularConfigSourceTest.php
Go to the documentation of this file.
1 <?php
7 
10 
16 class ModularConfigSourceTest extends \PHPUnit\Framework\TestCase
17 {
21  private $reader;
22 
26  private $source;
27 
28  public function setUp()
29  {
30  $this->reader = $this->getMockBuilder(Reader::class)
31  ->disableOriginalConstructor()
32  ->getMock();
33  $this->source = new ModularConfigSource($this->reader);
34  }
35 
36  public function testGet()
37  {
38  $this->reader->expects($this->once())
39  ->method('read')
40  ->willReturn(['data' => ['path' => 'value']]);
41  $this->assertEquals('value', $this->source->get('path'));
42  }
43 }