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/"); }
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."); }
public function setUp() { parent::setUp(); Config::set('storage.provider', 'filesystem'); }
protected function setConfig($collection, $action, $config) { Config::set('security.collections.' . $collection . '.' . $action, $config); }