Example #1
0
 public function testGetHomePath()
 {
     $executor = $this->getMockBuilder('TRex\\Cli\\Executor')->getMock();
     $executor->expects($this->once())->method('read')->with('composer config home --global --absolute')->will($this->returnValue('result'));
     $composer = new Composer($executor, new BalloonFactory(new DummyFileReaderFactory()));
     $this->assertSame('result', $composer->getHomePath());
 }
Example #2
0
 /**
  * @param Module $module
  * @return string
  */
 private function buildConfigPath(Module $module)
 {
     return $this->composer->getHomePath() . '/vendor/' . $module->getPackage() . '/.samurai.json';
 }