/** * Search for Pantheon product info * * ### OPTIONS * * [--category=<category>] * : general, publishing, commerce, etc * * [--type=<type>] * : Pantheon internal product type definition * * [--framework=<drupal|wordpress>] * : Filter based on framework * * @subcommand list * @alias all * **/ public function all($args = array(), $assoc_args = array()) { $defaults = array('type' => '', 'category' => '', 'framework' => ''); $assoc_args = array_merge($defaults, $assoc_args); $products = Products::instance(); $this->handleDisplay($products->query($assoc_args), $assoc_args); return $products; }
/** * @vcr products_instance */ function testProductsInstance() { $products = Products::instance(); $test = $products->getById('3b754bc2-48f8-4388-b5b5-2631098d03de'); $this->assertEquals('CiviCRM Starter Kit', $test['longname']); $test = $products->query(); $this->assertNotEmpty($test); }