public function testGetCurrentVersionFails() { copy(__DIR__ . '/testdata/composer_noversion.json', sys_get_temp_dir() . '/composer.json'); $context = new \Liip\RMT\Context(); $context->setParameter('project-root', sys_get_temp_dir()); $this->helper = new ComposerConfig($context); $this->assertNull($this->helper->getCurrentVersion()); }
protected function initialize(InputInterface $input, OutputInterface $output) { $helper = new ComposerConfig(); $file = $this->getApplication()->getProjectRootDir() . '/composer.json'; $helper->setComposerFile($file); $config = $helper->getRMTConfigSection(); if (!$config) { return; } $this->writeBigTitle('Current: ' . $helper->getProjectName() . ' ' . $helper->getCurrentVersion()); $this->writeEmptyLine(); }