예제 #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);
     }
 }
예제 #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);
 }