コード例 #1
0
ファイル: Reader.php プロジェクト: philipbrown/payload
 /**
  * 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
ファイル: FileTest.php プロジェクト: philipbrown/payload
 /** @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);
 }