/** * Get the contents of the file * * @param string $path * @return string */ public function contents($path) { if ($this->check($path)) { return File::contents($path); } }
/** @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); }