Bldr\Application::create PHP Method

create() public static method

public static create ( Dflydev\EmbeddedComposer\Core\EmbeddedComposerInterface $embeddedComposer ) : Application
$embeddedComposer Dflydev\EmbeddedComposer\Core\EmbeddedComposerInterface
return Application
    public static function create(EmbeddedComposerInterface $embeddedComposer)
    {
        return new Application($embeddedComposer);
    }

Usage Example

Exemplo n.º 1
0
 /**
  * @return Application
  */
 public static function createApplication()
 {
     $package = \Mockery::mock('Composer\\Package\\PackageInterface');
     $package->shouldReceive('getPrettyVersion')->andReturn('test');
     $embeddedComposer = \Mockery::mock('Dflydev\\EmbeddedComposer\\Core\\EmbeddedComposerInterface');
     $embeddedComposer->shouldReceive('findPackage')->once()->andReturn($package);
     $config = \Mockery::mock('Composer\\Config');
     $config->shouldReceive('has')->andReturn(false);
     $embeddedComposer->shouldReceive('getExternalComposerConfig')->andReturn($config);
     $embeddedComposer->shouldReceive('getExternalRootDirectory')->andReturn(__DIR__);
     // doesn't matter.
     return Application::create($embeddedComposer);
 }