Exemplo n.º 1
0
 /**
  * Lazy load and run.
  *
  * @param string $projectDir
  *
  * @return ComposerJson
  */
 public static function get($projectDir)
 {
     $composer = new ComposerJson();
     $composer->getComposerJsonFile($projectDir);
     $composer->parseComposerJsonData();
     $composer->validateComposerJsonObject();
     return $composer;
 }
Exemplo n.º 2
0
 public function testStaticGet()
 {
     $composerJsonStatic = ComposerJson::get(build_path(__DIR__, "data"));
     $composerJson = new ComposerJson();
     $composerJson->getComposerJsonFile(build_path(__DIR__, "data"));
     $composerJson->parseComposerJsonData();
     $composerJson->validateComposerJsonObject();
     $this->assertTrue($composerJsonStatic == $composerJson);
 }