コード例 #1
0
ファイル: NpmManagerTest.php プロジェクト: hshn/HshnNpmBundle
 /**
  * @test
  */
 public function testRun()
 {
     $processes = $this->manager->install(['foo' => 'bar']);
     $this->assertCount(2, $processes);
     $this->assertArrayHasKey('foo', $processes);
     $this->assertArrayHasKey('bar', $processes);
     $this->npm->install(['foo' => 'bar'], Argument::type(ConfigurationInterface::class))->shouldBeCalledTimes(2);
 }
コード例 #2
0
ファイル: NpmManager.php プロジェクト: hshn/HshnNpmBundle
 /**
  * @param array $commands
  * @return \Symfony\Component\Process\Process[]
  */
 public function install(array $commands = [])
 {
     return $this->each(function (ConfigurationInterface $configuration) use($commands) {
         return $this->npm->install($commands, $configuration);
     });
 }