blob: e53b7a28d60bc6b9a2e23231246cd5ee3b19a0ce [file] [log] [blame]
<?php require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/app.class.php"); require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/nav.class.php"); require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/menu.class.php"); $App = new App(); $Nav = new Nav(); $Menu = new Menu(); include($App->getProjectCommon()); # All on the same line to unclutter the user's desktop'
/*******************************************************************************
* Copyright (c) 2009 Eclipse Foundation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Wayne Beaton (Eclipse Foundation)- initial API and implementation
*******************************************************************************/
require_once(dirname(__FILE__) . '/../classes/CQ.class.php');
require_once(dirname(__FILE__) . '/../classes/ProjectRoot.class.php');
require_once(dirname(__FILE__) . '/../classes/TestRunner.class.php');
require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/app.class.php");
$App = new App();
class CQTests extends TestCase {
function testFindParent1() {
$cq = new CQ(42, 'Apache Commons Net Version: 2.0 (Subset) (PB Orbit CQ3044)', array());
$this->assertEquals('3044', $cq->get_parent_id());
}
function testFindParent2() {
$cq = new CQ(42, 'Logback Core Version: 0.9.19 (ATO CQ3861)', array());
$this->assertEquals('3861', $cq->get_parent_id());
}
function testMatchParentCQs() {
$parent = new CQ(3044, 'parent', array());
$child = new CQ(4999, 'Apache Commons Net Version: 2.0 (Subset) (PB Orbit CQ3044)', array());
$cqs = array($parent, $child);
matchParentCQs($cqs);
$this->assertEquals($parent, $child->getParent());
$this->assertEquals($parent, $child->get_root());
}
}
$App = new App();
$runner = new TestRunner("CQTests");
$runner->run_tests();
?>