Esempio n. 1
0
 public function testHelpers()
 {
     Config::set('repository.url', 'https://github.com/doubleleft/hook');
     Config::set('repository.author', 'doubleleft');
     $string = Module::template("{{ config 'repository.url' }} by {{config 'repository.author'}}.")->compile();
     $this->assertTrue($string == "https://github.com/doubleleft/hook by doubleleft.");
     $string = Module::template("{{ public_url }}")->compile();
     $this->assertTrue($string == "http://localhost/");
 }
Esempio n. 2
0
 public function testStore()
 {
     Config::set('storage.provider', 'amazon_aws');
     //
     // How to mock aws sdk requests:
     // http://docs.aws.amazon.com/aws-sdk-php/guide/latest/feature-facades.html
     //
     $mockS3Client = $this->getMockBuilder('Aws\\S3\\S3Client')->disableOriginalConstructor()->getMock();
     // $file = File::create(array(
     //     'file' => 'data:text/plain;base64,' . base64_encode('Saving text file.')
     // ));
     // $this->assertTrue(preg_match('/^http:\/\//', $file->path) == 1);
     // $this->assertTrue($file->read() == "Saving text file.");
 }
Esempio n. 3
0
 public function setUp()
 {
     parent::setUp();
     Config::set('storage.provider', 'filesystem');
 }
Esempio n. 4
0
 protected function setConfig($collection, $action, $config)
 {
     Config::set('security.collections.' . $collection . '.' . $action, $config);
 }