public function testRawFileContentsReal() { // Let's make sure the command we're running is legit $expectedContents = trim(shell_exec('git show HEAD:composer.json')); // Replicate the actual shell invocation that would take place Diesel::registerInstantiator('Bart\\Shell\\Command', function () { $shell = new Shell(); $args = func_get_args(); return call_user_func_array([$shell, 'command'], $args); }); $commit = new Commit(new GitRoot(BART_DIR . '/.git'), 'HEAD'); $actualContents = trim($commit->rawFileContents('composer.json')); $this->assertEquals($expectedContents, $actualContents, 'Raw file contents'); }