public function indexAction() { $regex = $this->getInvokeArg('bootstrap')->getOption('paramregex'); $branch = preg_match($regex['branch'], $this->_getParam('branch')) === 0 ? 'trunk' : $this->_getParam('branch'); $data = $this->getEmptyResult(); $data['results'] = Application_Model_BundlePeer::getBundles($branch); $this->getResponse()->setBody(json_encode($data)); $this->getResponse()->setHttpResponseCode(200); }
public function testGetBundlesIgnoreFiles() { $data = Application_Model_BundlePeer::getBundles('trunk'); $this->assertInternalType('array', $data); $this->assertEquals(0, count($data)); }