private function mockIO($method = null) { $io = $this->getMock('Composer\\IO\\IOInterface'); if (null !== $method) { $io->expects($this->any())->method($method)->willReturn(true); } return $io; }