all() public method

public all ( )
示例#1
0
    public function test_Should_GetAllAppSettings()
    {
        $config = <<<EOF
APP_URL=http://example.com

EOF;
        $dotenv = vfsStream::newFile('.env')->at($this->rootDir)->setContent($config);
        $dotenvReader = new DotenvReader(new LaravelFilesystem($this->app['files']), vfsStream::url('rootDir/.env'));
        $dotenvWriter = new DotenvWriter(new LaravelFilesystem($this->app['files']), vfsStream::url('rootDir/.env'));
        $configAppSettingRepository = new ConfigAppSetting($dotenvReader, $dotenvWriter);
        $appSettings = $configAppSettingRepository->all();
        $this->assertEquals('http://example.com', $appSettings->getUrl());
    }