本文整理汇总了PHP中TestManager类的典型用法代码示例。如果您正苦于以下问题:PHP TestManager类的具体用法?PHP TestManager怎么用?PHP TestManager使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了TestManager类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: test__construct
public function test__construct()
{
$metadata = new ClassMetadata(__NAMESPACE__ . '\\ModelTest');
$metadata->addModel('entity', __NAMESPACE__ . '\\EntityTest');
$metadata->setIdentifier('entity', 'id');
$metadataFactory = $this->getMock('Pok\\PoolDBM\\Mapping\\ClassMetadataFactory', array('getMetadataFor', 'setModelManager'));
$metadataFactory->expects($this->any())->method('getMetadataFor')->will($this->returnValue($metadata));
$refl = new \ReflectionClass('Pok\\PoolDBM\\Manager\\BaseManager');
$this->assertTrue($refl->isInstantiable());
$pool = new Pool();
$pool->addManager('entity', new EntityManager());
$manager = new TestManager(__NAMESPACE__ . '\\ModelTest', new ModelManager($pool, $metadataFactory));
$this->assertInstanceOf('Pok\\PoolDBM\\ModelRepository', $manager->getRepository($manager));
$this->assertInstanceOf(__NAMESPACE__ . '\\ModelTest', $manager->create());
$manager->save(new ModelTest());
$manager->save(new ModelTest(), true);
try {
$manager->save(new \stdClass());
} catch (\RuntimeException $e) {
$this->assertEquals('Manager "Pok\\PoolDBM\\Tests\\Manager\\TestManager" is unable to save model "stdClass"', $e->getMessage());
}
$manager->clear();
$this->assertInstanceOf(__NAMESPACE__ . '\\ModelTest', $manager->find(null));
$this->assertEquals(1, count($manager->findBy(array())));
$this->assertInstanceOf(__NAMESPACE__ . '\\ModelTest', $manager->findOneBy(array()));
$this->assertEquals(1, count($manager->findAll()));
}
示例2: handleCustomTestSuite
/**
* Sets the proper test suite to use and loads the test file in it.
* this method gets called as a callback from the parent class
*
* @return void
*/
protected function handleCustomTestSuite()
{
$manager = new TestManager($this->_params);
if (!empty($this->_params['case'])) {
$this->arguments['test'] = $manager->getTestSuite();
$this->arguments['test']->setFixtureManager($manager->getFixtureManager());
$manager->loadCase($this->_params['case'] . '.test.php', $this->arguments['test']);
}
}
示例3: AllCoreJavascriptHelpersGroupTest
/**
* AllCoreHelpersGroupTest method
*
* @access public
* @return void
*/
function AllCoreJavascriptHelpersGroupTest() {
$helperTestPath = CORE_TEST_CASES . DS . 'libs' . DS . 'view' . DS . 'helpers' . DS;
TestManager::addTestFile($this, $helperTestPath . 'js.test.php');
TestManager::addTestFile($this, $helperTestPath . 'jquery_engine.test.php');
TestManager::addTestFile($this, $helperTestPath . 'mootools_engine.test.php');
TestManager::addTestFile($this, $helperTestPath . 'prototype_engine.test.php');
}
示例4: ControllerGroupTest
/**
* LibControllerGroupTest method
*
* @access public
* @return void
*/
function ControllerGroupTest() {
TestManager::addTestFile($this, CORE_TEST_CASES . DS . 'libs' . DS . 'controller' . DS . 'controller');
TestManager::addTestFile($this, CORE_TEST_CASES . DS . 'libs' . DS . 'controller' . DS . 'scaffold');
TestManager::addTestFile($this, CORE_TEST_CASES . DS . 'libs' . DS . 'controller' . DS . 'pages_controller');
TestManager::addTestFile($this, CORE_TEST_CASES . DS . 'libs' . DS . 'controller' . DS . 'component');
TestManager::addTestFile($this, CORE_TEST_CASES . DS . 'libs' . DS . 'controller' . DS . 'controller_merge_vars');
}
示例5: ModelGroupTest
function ModelGroupTest()
{
TestManager::addTestFile($this, CORE_TEST_CASES . DS . 'libs' . DS . 'model' . DS . 'model');
TestManager::addTestFile($this, CORE_TEST_CASES . DS . 'libs' . DS . 'model' . DS . 'db_acl');
TestManager::addTestFile($this, CORE_TEST_CASES . DS . 'libs' . DS . 'model' . DS . 'datasources' . DS . 'dbo_source');
TestManager::addTestCasesFromDirectory($this, CORE_TEST_CASES . DS . 'libs' . DS . 'model' . DS . 'behaviors');
}
示例6: ControllersGroupTest
public function ControllersGroupTest()
{
TestManager::addTestFile($this, APP . 'tests' . DS . 'cases' . DS . 'controllers' . DS . 'addresses_controller');
TestManager::addTestFile($this, APP . 'tests' . DS . 'cases' . DS . 'controllers' . DS . 'alerts_controller');
TestManager::addTestFile($this, APP . 'tests' . DS . 'cases' . DS . 'controllers' . DS . 'app_controller');
TestManager::addTestFile($this, APP . 'tests' . DS . 'cases' . DS . 'controllers' . DS . 'app_settings_controller');
TestManager::addTestFile($this, APP . 'tests' . DS . 'cases' . DS . 'controllers' . DS . 'attachments_controller');
TestManager::addTestFile($this, APP . 'tests' . DS . 'cases' . DS . 'controllers' . DS . 'campuses_controller');
TestManager::addTestFile($this, APP . 'tests' . DS . 'cases' . DS . 'controllers' . DS . 'comments_controller');
TestManager::addTestFile($this, APP . 'tests' . DS . 'cases' . DS . 'controllers' . DS . 'covenants_controller');
TestManager::addTestFile($this, APP . 'tests' . DS . 'cases' . DS . 'controllers' . DS . 'dates_controller');
TestManager::addTestFile($this, APP . 'tests' . DS . 'cases' . DS . 'controllers' . DS . 'households_controller');
TestManager::addTestFile($this, APP . 'tests' . DS . 'cases' . DS . 'controllers' . DS . 'invitations_controller');
TestManager::addTestFile($this, APP . 'tests' . DS . 'cases' . DS . 'controllers' . DS . 'involvement_leaders_controller');
TestManager::addTestFile($this, APP . 'tests' . DS . 'cases' . DS . 'controllers' . DS . 'involvements_controller');
TestManager::addTestFile($this, APP . 'tests' . DS . 'cases' . DS . 'controllers' . DS . 'leaders_controller');
TestManager::addTestFile($this, APP . 'tests' . DS . 'cases' . DS . 'controllers' . DS . 'merge_requests_controller');
TestManager::addTestFile($this, APP . 'tests' . DS . 'cases' . DS . 'controllers' . DS . 'ministries_controller');
TestManager::addTestFile($this, APP . 'tests' . DS . 'cases' . DS . 'controllers' . DS . 'ministry_leaders_controller');
TestManager::addTestFile($this, APP . 'tests' . DS . 'cases' . DS . 'controllers' . DS . 'notifications_controller');
TestManager::addTestFile($this, APP . 'tests' . DS . 'cases' . DS . 'controllers' . DS . 'pages_controller');
TestManager::addTestFile($this, APP . 'tests' . DS . 'cases' . DS . 'controllers' . DS . 'payment_options_controller');
TestManager::addTestFile($this, APP . 'tests' . DS . 'cases' . DS . 'controllers' . DS . 'payments_controller');
TestManager::addTestFile($this, APP . 'tests' . DS . 'cases' . DS . 'controllers' . DS . 'reports_controller');
TestManager::addTestFile($this, APP . 'tests' . DS . 'cases' . DS . 'controllers' . DS . 'roles_controller');
TestManager::addTestFile($this, APP . 'tests' . DS . 'cases' . DS . 'controllers' . DS . 'rosters_controller');
TestManager::addTestFile($this, APP . 'tests' . DS . 'cases' . DS . 'controllers' . DS . 'searches_controller');
TestManager::addTestFile($this, APP . 'tests' . DS . 'cases' . DS . 'controllers' . DS . 'sys_emails_controller');
TestManager::addTestFile($this, APP . 'tests' . DS . 'cases' . DS . 'controllers' . DS . 'users_controller');
}
示例7: get_instance
/**
* Retrieves the singleton instance
* @return TestManager the instance
*/
public static function get_instance()
{
if (is_null(self::$instance)) {
self::$instance = new self();
}
return self::$instance;
}
示例8: testBasicQuery
public function testBasicQuery()
{
TestManager::loadBasicDummyData();
$database = new DatabaseManager();
$resource = $database->query("SHOW TABLES");
$this->assertNotEquals(false, $resource);
}
示例9: DatabaseGroupTest
/**
* ModelGroupTest method
*
* @access public
* @return void
*/
function DatabaseGroupTest()
{
TestManager::addTestFile($this, CORE_TEST_CASES . DS . 'libs' . DS . 'model' . DS . 'db_acl');
TestManager::addTestFile($this, CORE_TEST_CASES . DS . 'libs' . DS . 'model' . DS . 'schema');
TestManager::addTestFile($this, CORE_TEST_CASES . DS . 'libs' . DS . 'model' . DS . 'connection_manager');
TestManager::addTestFile($this, CORE_TEST_CASES . DS . 'libs' . DS . 'model' . DS . 'datasources' . DS . 'dbo_source');
}
示例10: TestSuiteGroupTest
/**
* TestSuiteGroupTest method
*
* @access public
* @return void
*/
function TestSuiteGroupTest()
{
TestManager::addTestFile($this, CORE_TEST_CASES . DS . 'libs' . DS . 'test_manager');
TestManager::addTestFile($this, CORE_TEST_CASES . DS . 'libs' . DS . 'code_coverage_manager');
TestManager::addTestFile($this, CORE_TEST_CASES . DS . 'libs' . DS . 'cake_test_case');
TestManager::addTestFile($this, CORE_TEST_CASES . DS . 'libs' . DS . 'cake_test_fixture');
}
示例11: AllCompatibleGroupTest
function AllCompatibleGroupTest()
{
$cases = dirname(dirname(__FILE__)) . DS . 'cases' . DS;
TestManager::addTestCasesFromDirectory($this, $cases . DS . 'models' . DS . 'behaviors');
TestManager::addTestCasesFromDirectory($this, $cases . DS . 'libs');
TestManager::addTestCasesFromDirectory($this, $cases . DS . 'views' . DS . 'helpers');
}
示例12: HelpersGroupTest
public function HelpersGroupTest()
{
TestManager::addTestFile($this, APP . 'tests' . DS . 'cases' . DS . 'helpers' . DS . 'app_helper');
TestManager::addTestFile($this, APP . 'tests' . DS . 'cases' . DS . 'helpers' . DS . 'formatting');
TestManager::addTestFile($this, APP . 'tests' . DS . 'cases' . DS . 'helpers' . DS . 'permission');
TestManager::addTestFile($this, APP . 'tests' . DS . 'cases' . DS . 'helpers' . DS . 'select_options');
TestManager::addTestFile($this, APP . 'tests' . DS . 'cases' . DS . 'helpers' . DS . 'report');
}
示例13: allGroupTest
function allGroupTest()
{
TestManager::addTestCasesFromDirectory($this, APP_TEST_CASES . DS . 'models');
TestManager::addTestCasesFromDirectory($this, APP_TEST_CASES . DS . 'helpers');
TestManager::addTestCasesFromDirectory($this, APP_TEST_CASES . DS . 'controllers');
TestManager::addTestCasesFromDirectory($this, APP_TEST_CASES . DS . 'components');
TestManager::addTestCasesFromDirectory($this, APP_TEST_CASES . DS . 'behaviors');
}
示例14: ModelGroupTest
/**
* ModelGroupTest method
*
* @access public
* @return void
*/
function ModelGroupTest() {
TestManager::addTestFile($this, CORE_TEST_CASES . DS . 'libs' . DS . 'model' . DS . 'model_behavior');
TestManager::addTestFile($this, CORE_TEST_CASES . DS . 'libs' . DS . 'model' . DS . 'model_read');
TestManager::addTestFile($this, CORE_TEST_CASES . DS . 'libs' . DS . 'model' . DS . 'model_write');
TestManager::addTestFile($this, CORE_TEST_CASES . DS . 'libs' . DS . 'model' . DS . 'model_delete');
TestManager::addTestFile($this, CORE_TEST_CASES . DS . 'libs' . DS . 'model' . DS . 'model_integration');
TestManager::addTestFile($this, CORE_TEST_CASES . DS . 'libs' . DS . 'model' . DS . 'model_validation');
}
示例15: project_check_group
function project_check_group()
{
$this->GroupTest('project tests');
TestManager::addTestCasesFromDirectory($this, LIMB_DIR . '/tests/cases/project_check');
SiteObjectsTestManager::addTestCasesWithLoader($this, new project_site_objects_loader());
}