public function testGetAll()
 {
     $config = $this->getMockBuilder(ConfigInterface::class)->disableOriginalConstructor()->getMock();
     $expectedResult = ['lots' => 'of', 'config' => 'values'];
     $config->expects($this->once())->method('toArray')->will($this->returnValue($expectedResult));
     $service = new SiteConfigService($config);
     $result = $service->getAll();
     $this->assertSame($expectedResult, $result);
 }
예제 #2
0
 /**
  * @param string      $name
  * @param null|string $default
  *
  * @return string
  */
 public function __invoke($name, $default = null)
 {
     return $this->siteConfigService->get($name, $default);
 }