/** * Get bundle info * * @param string $bundle Bundle name, URI or filename * * @throws \Exception * @return array */ public function getBundleInfo($bundle) { $bundle = new Bundle($bundle, $this->getConfig()); return $bundle->getInfo(); }
public function testExtractByName() { $bundlesConfig = dirname(__FILE__) . '/../../configs/bundles.yml'; $path = new ProjectPath(dirname(__FILE__) . '/Bundle/project/'); $bundle = new Bundle('test', new Config($bundlesConfig)); @unlink($path . '/plugins/Processor/Test.php'); @unlink($path . '/plugins/Site/View/Test.php'); $this->assertFalse(file_exists($path . '/plugins/Processor/Test.php')); $this->assertFalse(file_exists($path . '/plugins/Site/View/Test.php')); $bundle->extractTo($path); $this->assertTrue(file_exists($path . '/plugins/Processor/Test.php')); $this->assertTrue(file_exists($path . '/plugins/Site/View/Test.php')); @unlink($path . '/plugins/Processor/Test.php'); @unlink($path . '/plugins/Site/View/Test.php'); }