Exemplo n.º 1
0
 /**
  * Get the contents of the file
  *
  * @param string $path
  * @return string
  */
 public function contents($path)
 {
     if ($this->check($path)) {
         return File::contents($path);
     }
 }
Exemplo n.º 2
0
 /** @test */
 public function should_get_the_contents_of_a_file()
 {
     $contents = File::contents(sprintf('%s/stubs/data.json', __DIR__));
     $this->assertEquals(json_encode(['hello' => 'world']), $contents);
 }