public static function suite() { $suite = new TestSuite('Haanga test suite'); $suite->addTestSuite('templateTest'); $suite->addTestSuite('errorTest'); return $suite; }
public static function suite() { $suite = new TestSuite('AmpolirosCore'); $suite->addTestSuite(new ReflectionClass('AmpolirosTest')); $suite->addTestSuite(new ReflectionClass('AmpConfigTest')); return $suite; }
/** * Add child TestSuite to the provided TestSuite from the XML node * * @param TestSuite $testSuite * @param \SimpleXMLElement $xml */ public function addTestSuite(TestSuite $testSuite, \SimpleXMLElement $xml) { foreach ($xml->xpath('./testsuite') as $element) { $suite = new TestSuite((string) $element['name'], (string) $element['file'], (string) $element['namespace'], (string) $element['fullPackage']); $this->addTestCase($suite, $element); $this->addTestSuite($suite, $element); $testSuite->addTestSuite($suite); } }
/** * @param \Iterator $files * @param TestSuite $testSuite * * @return TestSuite */ public function merge(\Iterator $files, TestSuite $testSuite = null) { if (!$testSuite) { $testSuite = new TestSuite(null, null, null, null); } $loader = new PHPUnitLoader(); foreach ($files as $file) { $suite = $loader->load($file->getContents()); if (!$suite) { continue; } $testSuite->addTestSuite($suite); } return $testSuite; }
public static function suite() { $suite = new TestSuite('AmpolirosDatatransfer'); $suite->addTestSuite(new ReflectionClass('ClipboardTest')); return $suite; }
public static function suite() { $suite = new TestSuite('onPHP-' . ONPHP_VERSION); foreach (self::$paths as $testPath) { foreach (glob($testPath . '*Test' . EXT_CLASS, GLOB_BRACE) as $file) { $suite->addTestFile($file); } } // meta, DB and DAOs ordered tests portion if (self::$dbs) { try { Singleton::getInstance('DBTestPool', self::$dbs)->connect(); } catch (Exception $e) { Singleton::dropInstance('DBTestPool'); Singleton::getInstance('DBTestPool'); } // build stuff from meta $metaDir = ONPHP_TEST_PATH . 'meta' . DIRECTORY_SEPARATOR; $path = ONPHP_META_PATH . 'bin' . DIRECTORY_SEPARATOR . 'build.php'; $_SERVER['argv'] = array(); $_SERVER['argv'][0] = $path; $_SERVER['argv'][1] = $metaDir . 'config.inc.php'; $_SERVER['argv'][2] = $metaDir . 'config.meta.xml'; $_SERVER['argv'][] = '--force'; $_SERVER['argv'][] = '--no-schema-check'; $_SERVER['argv'][] = '--drop-stale-files'; include $path; // provide paths to autogenerated stuff set_include_path(get_include_path() . PATH_SEPARATOR . ONPHP_META_AUTO_BUSINESS_DIR . PATH_SEPARATOR . ONPHP_META_AUTO_DAO_DIR . PATH_SEPARATOR . ONPHP_META_AUTO_PROTO_DIR . PATH_SEPARATOR . ONPHP_META_DAO_DIR . PATH_SEPARATOR . ONPHP_META_BUSINESS_DIR . PATH_SEPARATOR . ONPHP_META_PROTO_DIR); $daoTest = new DAOTest(); $out = MetaConfiguration::me()->getOutput(); foreach (DBTestPool::me()->getPool() as $connector => $db) { DBPool::me()->setDefault($db); $out->info('Using ')->info(get_class($db), true)->infoLine(' connector.'); try { $daoTest->drop(); } catch (DatabaseException $e) { // previous shutdown was clean } $daoTest->create()->fill(false); MetaConfiguration::me()->checkIntegrity(); $out->newLine(); $daoTest->drop(); } DBPool::me()->dropDefault(); } $suite->addTestSuite('DAOTest'); return $suite; }
/** * List of tests used for Github Publication * * @return TestSuite */ public static function suite() { $suite = new TestSuite('Github Publication'); // New customer creation in backend (MAGETWO-12516) $suite->addTestSuite('Magento\\Customer\\Test\\TestCase\\BackendCustomerCreateTest'); // Using USPS/UPS/FedEx/DHL(EU)/DHL(US) online shipping carrier on checkout as a registered customer // (MAGETWO-12444, MAGETWO-12848, MAGETWO-12849, MAGETWO-12850, MAGETWO-12851) $suite->addTestSuite('Magento\\Checkout\\Test\\TestCase\\ShippingCarrierTest'); // Adding temporary redirect for product (MAGETWO-12409) $suite->addTestSuite('Magento\\UrlRewrite\\Test\\TestCase\\CreateProductUrlRewriteEntityTest'); // Creating offline order for registered/new customer in admin (MAGETWO-12395, MAGETWO-12520) $suite->addTestSuite('Magento\\Sales\\Test\\TestCase\\CreateOrderTest'); // Creating customer account (MAGETWO-12394) $suite->addTestSuite('Magento\\Customer\\Test\\TestCase\\RegisterCustomerFrontendEntityTest'); // Creating Grouped product and assign it to the category (MAGETWO-13610) $suite->addTestSuite('Magento\\GroupedProduct\\Test\\TestCase\\CreateGroupedTest'); // Creating Virtual product with required fields only and assign it to the category (MAGETWO-13593) $suite->addTestSuite('Magento\\Catalog\\Test\\TestCase\\Product\\CreateVirtualTest'); // Creating Downloadable product with required fields only and assign it to the category (MAGETWO-13595) $suite->addTestSuite('Magento\\Downloadable\\Test\\TestCase\\Create\\LinksPurchasedSeparatelyTest'); // Using ACL Role with full GWS Scope (without using Secret Key to URLs) (MAGETWO-12375, MAGETWO-12385) $suite->addTestSuite('Magento\\User\\Test\\TestCase\\UserWithRestrictedRoleTest'); // Creating simple product with creating new category (required fields only) (MAGETWO-13345) $suite->addTestSuite('Magento\\Catalog\\Test\\TestCase\\Product\\CreateSimpleWithCategoryTest'); // Checkout products with special prices (MAGETWO-12429) $suite->addTestSuite('Magento\\Checkout\\Test\\TestCase\\ProductAdvancedPricingTest'); // Using layered navigation to filter product list (MAGETWO-12419) $suite->addTestSuite('Magento\\Catalog\\Test\\TestCase\\Layer\\FilterProductListTest'); // Using quick search to find the product (MAGETWO-12420) $suite->addTestSuite('Magento\\CatalogSearch\\Test\\TestCase\\SearchEntityResultsTest'); // Product Up-selling (MAGETWO-12391) $suite->addTestSuite('Magento\\Catalog\\Test\\TestCase\\Product\\UpsellTest'); // Product Cross-selling (MAGETWO-12390) $suite->addTestSuite('Magento\\Catalog\\Test\\TestCase\\Product\\CrosssellTest'); return $suite; }