public function json($file = null)
{
if (is_null($file)) {
$file = 'module.json';
}
return new Json($this->getPath() . '/' . $file, $this->app['files']);
}
/** @test */ public function it_reads_module_json_files() { $jsonModule = $this->module->json(); $composerJson = $this->module->json('composer.json'); $this->assertInstanceOf(Json::class, $jsonModule); $this->assertEquals('0.1', $jsonModule->get('version')); $this->assertInstanceOf(Json::class, $composerJson); $this->assertEquals('asgard-module', $composerJson->get('type')); }