PhpGitHooks\Application\Composer\ConfiguratorScript::buildConfig PHP Метод

buildConfig() публичный статический Метод

public static buildConfig ( Composer\Script\Event $event )
$event Composer\Script\Event
    public static function buildConfig(Event $event)
    {
        if (true === $event->isDevMode()) {
            $message = "Deprecated instalation script!!\n";
            $message .= "Please replace it by \\PhpGitHooks\\Infrastructure\\Composer\\ConfiguratorScript::buildConfig\nin your composer.json file";
            $event->getIO()->writeError(sprintf('<error>%s</error>', $message));
        }
    }

Usage Example

 /**
  * @test
  */
 public function buildConfigReturnsProcess()
 {
     $iO = Mockery::mock(IOInterface::class);
     $iO->shouldReceive('ask');
     $this->event->shouldReceive('isDevMode')->andReturn(true);
     $this->event->shouldReceive('getIO')->andReturn($iO);
     $buildConfig = ConfiguratorScript::buildConfig($this->event);
     $this->assertNull($buildConfig);
 }
ConfiguratorScript