public function test_chain_commands() { $this->registerMockShell(); $git = new Git('.git'); $hello_world_commands = array('hello world', 'and then there was more'); $method = Util\Reflection_Helper::get_method('Bart\\Git', 'chain_commands'); $hello = $method->invokeArgs($git, array($hello_world_commands)); $this->assertEquals($hello, 'git --git-dir=.git hello world && git --git-dir=.git and then there was more', 'Chain commands produced wrong cmd'); }