亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? emailnotificationconfigurationtest.php

?? 國外的人才求職招聘最新版
?? PHP
字號:
<?php
/**
 * OrangeHRM is a comprehensive Human Resource Management (HRM) System that captures
 * all the essential functionalities required for any enterprise.
 * Copyright (C) 2006 OrangeHRM Inc., http://www.orangehrm.com
 *
 * OrangeHRM is free software; you can redistribute it and/or modify it under the terms of
 * the GNU General Public License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * OrangeHRM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See the GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along with this program;
 * if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 * Boston, MA  02110-1301, USA
 *
 */


// Call EmailNotificationConfigurationTest::main() if this source file is executed directly.
if (!defined("PHPUnit_MAIN_METHOD")) {
    define("PHPUnit_MAIN_METHOD", "EmailNotificationConfigurationTest::main");
}

require_once "PHPUnit/Framework/TestCase.php";
require_once "PHPUnit/Framework/TestSuite.php";

require_once "testConf.php";

require_once 'EmailNotificationConfiguration.php';

/**
 * Test class for EmailNotificationConfiguration.
 * Generated by PHPUnit_Util_Skeleton on 2007-02-20 at 10:17:50.
 */
class EmailNotificationConfigurationTest extends PHPUnit_Framework_TestCase {
	public $classNotifications = null;
    public $connection = null;

    /**
     * Runs the test methods of this class.
     *
     * @access public
     * @static
     */
    public static function main() {
        require_once "PHPUnit/TextUI/TestRunner.php";

        $suite  = new PHPUnit_Framework_TestSuite("EmailNotificationConfigurationTest");
        $result = PHPUnit_TextUI_TestRunner::run($suite);
    }

    /**
     * Sets up the fixture, for example, open a network connection.
     * This method is called before a test is executed.
     *
     * @access protected
     */
    protected function setUp() {
		$this->classNotifications = new EmailNotificationConfiguration('USR010');

		$conf = new Conf();

    	$this->connection = mysql_connect($conf->dbhost.":".$conf->dbport, $conf->dbuser, $conf->dbpass);
        mysql_select_db($conf->dbname);

		mysql_query("DELETE FROM `hs_hr_users` WHERE `id` = 'USR010'", $this->connection);
    	mysql_query("DELETE FROM `hs_hr_users` WHERE `id` = 'USR011'", $this->connection);

    	mysql_query("INSERT INTO `hs_hr_users` VALUES ('USR010', 'demo1', 'fe01ce2a7fbac8fafaed7c982a04e229', 'Admin', NULL, NULL, NULL, 'Yes', '1', NULL, '0000-00-00 00:00:00', '0000-00-00 00:00:00', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Enabled', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, 'USG001')");
		mysql_query("INSERT INTO `hs_hr_users` VALUES ('USR011', 'demo2', 'fe01ce2a7fbac8fafaed7c982a04e229', 'Admin', NULL, NULL, NULL, 'Yes', '1', NULL, '0000-00-00 00:00:00', '0000-00-00 00:00:00', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Enabled', NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, 'USG001')");

    	mysql_query("INSERT INTO `hs_hr_mailnotifications` (`user_id`, `notification_type_id`, `status`) VALUES ('USR010', 0, 1)");
    	mysql_query("INSERT INTO `hs_hr_mailnotifications` (`user_id`, `notification_type_id`, `status`) VALUES ('USR010', 2, 0)");
    }

    /**
     * Tears down the fixture, for example, close a network connection.
     * This method is called after a test is executed.
     *
     * @access protected
     */
    protected function tearDown() {
		mysql_query("DELETE FROM `hs_hr_users` WHERE `id` = 'USR010'", $this->connection);
    	mysql_query("DELETE FROM `hs_hr_users` WHERE `id` = 'USR011'", $this->connection);

		mysql_query("TRUNCATE TABLE `hs_hr_mailnotifications`", $this->connection);
    }

    public function testFetchNotifcationStatus() {
		$res = $this->classNotifications->fetchNotifcationStatus();

		$expected[0] = array('USR010', 0, 1);
		$expected[1] = array('USR010', 2, 0);

		$this->assertNotNull($res, 'Unexpected behavior');
		$this->assertTrue(is_array($res), 'Invalid result type');

		//$this->assertEquals(2, count($res), 'Invallid Number of records');

		for ($i=0; $i<count($expected); $i++) {
			$this->assertEquals($expected[$i][0], $res[$i]->getUserId(), 'Invallid employee id');
			$this->assertEquals($expected[$i][1], $res[$i]->getNotifcationTypeId(), 'Invallid notification');
			$this->assertEquals($expected[$i][2], $res[$i]->getNotificationStatus(), 'Invallid notification status');
		}
    }

    public function testFetchNotifcationStatus1() {
		$obj = new EmailNotificationConfiguration('USR092');

		$res = $obj->fetchNotifcationStatus();

		$this->assertNull($res, 'Unexpected behavior');
    }

    public function testUpdateNotificationStatus() {

		$this->classNotifications->setUserId('USR011');
 		$this->classNotifications->setNotifcationTypeId(0);
		$this->classNotifications->setNotificationStatus(1);

 		$res = $this->classNotifications->updateNotificationStatus();

 		$this->assertTrue($res, 'Update failed');

 		$res = $this->classNotifications->fetchNotifcationStatus();

		$expected[0] = array('USR011', 0, 1);

		$this->assertNotNull($res, 'Unexpected behavior');
		$this->assertTrue(is_array($res), 'Invalid result type');

		$this->assertEquals(1, count($res), 'Invallid Number of records');

		for ($i=0; $i<count($expected); $i++) {
			$this->assertEquals($expected[$i][0], $res[$i]->getUserId(), 'Invallid employee id');
			$this->assertEquals($expected[$i][1], $res[$i]->getNotifcationTypeId(), 'Invallid notification');
			$this->assertEquals($expected[$i][2], $res[$i]->getNotificationStatus(), 'Invallid notification status');
		}
    }


 	public function testUpdateNotificationStatus1() {

		$this->classNotifications->setUserId('USR010');
 		$this->classNotifications->setNotifcationTypeId(0);
		$this->classNotifications->setNotificationStatus(0);

 		$res = $this->classNotifications->updateNotificationStatus();

 		$this->assertTrue($res, 'Update failed');

		$res = $this->classNotifications->fetchNotifcationStatus();

		$expected[0] = array('USR010', 0, 0);
		$expected[1] = array('USR010', 2, 0);

		$this->assertNotNull($res, 'Unexpected behavior');
		$this->assertTrue(is_array($res), 'Invalid result type');

		$this->assertEquals(2, count($res), 'Invallid Number of records');

		for ($i=0; $i<count($res); $i++) {
			$this->assertEquals($expected[$i][0], $res[$i]->getUserId(), 'Invallid employee id');
			$this->assertEquals($expected[$i][1], $res[$i]->getNotifcationTypeId(), 'Invallid notification');
			$this->assertEquals($expected[$i][2], $res[$i]->getNotificationStatus(), 'Invallid notification status');
		}
    }

}

// Call EmailNotificationConfigurationTest::main() if this source file is executed directly.
if (PHPUnit_MAIN_METHOD == "EmailNotificationConfigurationTest::main") {
    EmailNotificationConfigurationTest::main();
}
?>

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产亚洲精品资源在线26u| 色综合网色综合| 亚洲高清视频的网址| 国产亚洲va综合人人澡精品| 日韩一区二区在线免费观看| 欧美精品久久一区二区三区| 欧美日韩黄色影视| 欧美日韩电影一区| 欧美日韩一区小说| 欧美性猛片xxxx免费看久爱| 欧美色区777第一页| 欧美精品在线观看一区二区| 91麻豆精品国产综合久久久久久| 欧美日韩国产区一| 欧美久久久久久久久久| 欧美大片一区二区三区| 久久久久久久久久美女| 欧美激情一区三区| 亚洲六月丁香色婷婷综合久久| 夜夜精品视频一区二区| 美女精品一区二区| 国产麻豆9l精品三级站| 色综合久久九月婷婷色综合| 欧美日韩一区小说| 久久久综合视频| 日韩理论片中文av| 五月婷婷综合激情| 精品亚洲成a人在线观看| 福利一区二区在线| 99久久国产综合精品女不卡| 欧美精品aⅴ在线视频| 精品99一区二区| ...xxx性欧美| 日本欧美一区二区在线观看| 国产1区2区3区精品美女| 欧美日韩国产一区二区三区地区| 欧美mv日韩mv| 亚洲精品亚洲人成人网| 精油按摩中文字幕久久| 色综合久久天天综合网| 久久久电影一区二区三区| 夜夜精品视频一区二区| 国产精品亚洲一区二区三区在线| 91精彩视频在线观看| 精品国产一区二区在线观看| 亚洲综合色丁香婷婷六月图片| 久久超碰97人人做人人爱| 色婷婷综合久久久| 久久精品一区四区| 日本不卡视频在线| 在线观看网站黄不卡| 欧美国产1区2区| 久久精品国产77777蜜臀| 91久久奴性调教| 国产日本欧美一区二区| 美女www一区二区| 欧美精品123区| 亚洲一区视频在线观看视频| 成人sese在线| 国产丝袜在线精品| 韩日精品视频一区| 欧美一区二区网站| 一区二区三区成人| 99久久婷婷国产综合精品电影| 精品嫩草影院久久| 久久精品国产亚洲aⅴ | 国产资源在线一区| 欧美日韩免费一区二区三区视频| 国产精品伦理一区二区| 国产精品一区二区在线观看网站| 精品国内片67194| 奇米精品一区二区三区四区| 欧美一区二区大片| 久久精品国产一区二区三区免费看| 91精品国产色综合久久不卡蜜臀| 一区二区三区精品视频在线| 91浏览器入口在线观看| 亚洲少妇30p| 色8久久人人97超碰香蕉987| 亚洲精品久久久久久国产精华液| 91理论电影在线观看| 一区二区在线电影| 欧美性videosxxxxx| 五月婷婷久久综合| 日韩精品中文字幕在线不卡尤物| 麻豆国产欧美日韩综合精品二区| 日韩精品一区二区三区视频播放| 九色综合国产一区二区三区| 欧美精品一区二区三| 国产成a人无v码亚洲福利| 国产精品久久久久久福利一牛影视 | 国产精品久久久久久久岛一牛影视| 成人毛片视频在线观看| 自拍视频在线观看一区二区| 欧美主播一区二区三区| 青青草国产成人99久久| 久久久国产午夜精品| 99国产精品久久久久| 午夜日韩在线电影| 精品国产a毛片| eeuss国产一区二区三区| 亚洲国产日韩精品| 欧美tickling挠脚心丨vk| 不卡的电影网站| 亚洲午夜久久久久中文字幕久| 欧美高清精品3d| 国产精品77777| 亚洲精品欧美综合四区| 日韩女优视频免费观看| 91丨九色丨蝌蚪富婆spa| 日韩高清一区二区| 中文字幕乱码久久午夜不卡| 欧美日韩一区中文字幕| 国产成人在线电影| 亚洲国产综合人成综合网站| 欧美精品一区男女天堂| 91免费国产在线| 蜜桃视频一区二区| 亚洲精品免费视频| 精品理论电影在线| 欧美综合一区二区三区| 国产乱一区二区| 亚洲午夜视频在线观看| 国产精品视频在线看| 日韩视频一区二区在线观看| 99精品久久久久久| 国产一区二区按摩在线观看| 偷拍一区二区三区四区| 亚洲丝袜美腿综合| 国产亚洲欧美激情| 精品乱人伦一区二区三区| 欧美日韩中文字幕一区二区| av成人动漫在线观看| 国产精品羞羞答答xxdd| 免费成人在线影院| 午夜精品福利久久久| 一区二区三区日韩| 国产精品久久久久久久久免费相片| 日韩欧美久久一区| 日韩亚洲国产中文字幕欧美| 欧美日韩一级二级三级| 色网站国产精品| 成人avav在线| 风间由美一区二区av101| 国产一区美女在线| 精品一区二区三区久久久| 日韩黄色小视频| 亚洲国产三级在线| 亚洲国产精品尤物yw在线观看| 亚洲欧美国产77777| 国产精品传媒视频| 中文字幕在线播放不卡一区| 国产精品三级电影| 中文字幕一区不卡| 亚洲欧美日韩国产综合| 亚洲精品高清视频在线观看| 亚洲一区二区高清| 午夜欧美视频在线观看 | 51午夜精品国产| 欧美日韩精品一区二区三区| 91麻豆精品国产91久久久久久 | 中文乱码免费一区二区| 国产精品久久久久久久浪潮网站| 国产精品卡一卡二| 亚洲精品视频免费看| 亚洲午夜精品在线| 日韩av电影免费观看高清完整版 | 亚洲欧美日韩国产一区二区三区 | 欧美色视频在线| 欧美一区二区三区在线观看| 日韩精品一区二区三区四区| 国产欧美日韩激情| 亚洲情趣在线观看| 日本在线播放一区二区三区| 卡一卡二国产精品| 丁香啪啪综合成人亚洲小说 | 99久久国产免费看| 精品视频在线视频| 精品久久久网站| 国产精品久久久久久久久晋中| 亚洲精品成人精品456| 日韩国产在线观看一区| 国产精品一二三| 91福利精品第一导航| 日韩欧美aaaaaa| 国产精品久99| 日本午夜精品一区二区三区电影| 国产在线视频一区二区三区| 91在线云播放| 日韩久久精品一区| 亚洲免费在线观看视频| 久久激情五月婷婷| 99精品国产一区二区三区不卡| 欧美精品自拍偷拍动漫精品| 中文字幕精品在线不卡| 日本视频一区二区| 91国偷自产一区二区三区成为亚洲经典| 555www色欧美视频| 亚洲乱码一区二区三区在线观看| 久久精品国产免费看久久精品|