Example #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;
 }
 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);
 }
Example #3
0
 /**
  * Common initiation logic
  */
 private function composerSymInit()
 {
     $this->setProjectDir($this->projectDir);
     $this->setHomeDir($this->homeDir);
     $this->composerJson = ComposerJson::get($this->projectDir);
     $this->core = new ComposerSymCore();
 }