[pLog-svn] r3814 - in plog/trunk/class: . config controller dao
data data/captcha data/validator/rules database/pdb
database/pdb/datadict file locale logger net/http object
summary/controller test test/helpers test/tests/config
test/tests/dao test/tests/data test/tests/data/validator
test/tests/data/validator/rules test/tests/extra
test/tests/file/unpacker test/tests/mail
test/tests/mail/phpmailer test/tests/net test/tests/net/http
test/tests/summary/action
oscar at devel.lifetype.net
oscar at devel.lifetype.net
Wed Jul 26 17:02:57 GMT 2006
Author: oscar
Date: 2006-07-26 17:02:57 +0000 (Wed, 26 Jul 2006)
New Revision: 3814
Modified:
plog/trunk/class/Doxyfile
plog/trunk/class/config/configdbstorage.class.php
plog/trunk/class/config/configfilestorage.class.php
plog/trunk/class/controller/admincontroller.class.php
plog/trunk/class/controller/blogcontroller.class.php
plog/trunk/class/controller/sequentialcontroller.class.php
plog/trunk/class/dao/archivelink.class.php
plog/trunk/class/dao/article.class.php
plog/trunk/class/dao/articlecategory.class.php
plog/trunk/class/dao/blogcategories.class.php
plog/trunk/class/dao/globalarticlecategories.class.php
plog/trunk/class/dao/globalarticlecategory.class.php
plog/trunk/class/dao/userinfo.class.php
plog/trunk/class/data/captcha/captcha.class.php
plog/trunk/class/data/jalalicalendar.class.php
plog/trunk/class/data/validator/rules/emailformatrule.class.php
plog/trunk/class/data/validator/rules/filteredpatternsrule.class.php
plog/trunk/class/data/validator/rules/filteredwordsrule.class.php
plog/trunk/class/data/validator/rules/regexprule.class.php
plog/trunk/class/data/validator/rules/stringrangerule.class.php
plog/trunk/class/database/pdb/datadict/pdbbasedatadict.class.php
plog/trunk/class/database/pdb/pdb.class.php
plog/trunk/class/file/fileproperties.class.php
plog/trunk/class/locale/locale.class.php
plog/trunk/class/logger/loggermanager.class.php
plog/trunk/class/net/http/httpcache.class.php
plog/trunk/class/object/exception.class.php
plog/trunk/class/summary/controller/summarycontroller.class.php
plog/trunk/class/test/helpers/htmlreporter.class.php
plog/trunk/class/test/helpers/lifetypetestcase.class.php
plog/trunk/class/test/testrunner.class.php
plog/trunk/class/test/tests/config/configdbstorage_test.class.php
plog/trunk/class/test/tests/config/configfilestorage_test.class.php
plog/trunk/class/test/tests/dao/article_test.class.php
plog/trunk/class/test/tests/dao/bloginfo_test.class.php
plog/trunk/class/test/tests/data/textfilter_test.class.php
plog/trunk/class/test/tests/data/validator/integervalidator_test.class.php
plog/trunk/class/test/tests/data/validator/rules/stringrangerule_test.class.php
plog/trunk/class/test/tests/data/validator/usernamevalidator_test.class.php
plog/trunk/class/test/tests/extra/sqlinjection_test.class.php
plog/trunk/class/test/tests/file/unpacker/zipunpacker_test.class.php
plog/trunk/class/test/tests/mail/emailservice_test.class.php
plog/trunk/class/test/tests/mail/phpmailer/phpmailer_test.class.php
plog/trunk/class/test/tests/net/http/httpclient_test.class.php
plog/trunk/class/test/tests/net/url_test.class.php
plog/trunk/class/test/tests/summary/action/summaryaction_test.class.php
Log:
added documentation to the code, although there still are a few classes left in the dao/ folder that could use better documentation.
Modified: plog/trunk/class/Doxyfile
===================================================================
--- plog/trunk/class/Doxyfile 2006-07-26 16:56:56 UTC (rev 3813)
+++ plog/trunk/class/Doxyfile 2006-07-26 17:02:57 UTC (rev 3814)
@@ -17,13 +17,13 @@
# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
# by quotes) that should identify the project.
-PROJECT_NAME = pLog
+PROJECT_NAME = LifeType
# The PROJECT_NUMBER tag can be used to enter a project or revision number.
# This could be handy for archiving the generated documentation or
# if some version control system is used.
-PROJECT_NUMBER = 1.0
+PROJECT_NUMBER = 1.1
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
# base path where the generated documentation will be put.
@@ -416,7 +416,7 @@
# directories like "/usr/src/myproject". Separate the files or directories
# with spaces.
-INPUT = class/ object/ dao/ logger/ gallery/ locale/ config/ file/ database/ data/forms security/ xml/ controller/ mail/ bayesian/ misc/ net/ data/ view/ plugin/ template/ action/ summary/dao/
+INPUT = ./bootstrap.php object/ dao/ logger/ gallery/ locale/ config/ file/ database/ data/forms security/ xml/ controller/ mail/ bayesian/ misc/ net/ data/ view/ plugin/ template/ action/ summary/ test/
# If the value of the INPUT tag contains directories, you can use the
# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
Modified: plog/trunk/class/config/configdbstorage.class.php
===================================================================
--- plog/trunk/class/config/configdbstorage.class.php 2006-07-26 16:56:56 UTC (rev 3813)
+++ plog/trunk/class/config/configdbstorage.class.php 2006-07-26 17:02:57 UTC (rev 3814)
@@ -122,6 +122,9 @@
return true;
}
+ /**
+ * @see ConfigAbstractStorage::getValue()
+ */
function getValue( $key, $defaultValue = null )
{
if (!is_object( $this->_cache )) {
@@ -147,6 +150,9 @@
}
}
+ /**
+ * @see ConfigAbstractStorage::setValue()
+ */
function setValue( $key, $value )
{
$this->_data[$key] = $value;
@@ -154,26 +160,43 @@
return true;
}
+ /**
+ * @see ConfigAbstractStorage::getAsArray()
+ */
function getAsArray()
{
return $this->_data;
}
+ /**
+ * @see ConfigAbstractStorage::getConfigFileName()
+ */
function getConfigFileName()
{
return "database";
}
+ /**
+ * Resets the current configuration settings and loads them from the database.
+ *
+ * @see ConfigAbstractStorage::reload()
+ */
function reload()
{
$this->_loadData();
}
+ /**
+ * @see ConfigAbstractStorage::getKeys()
+ */
function getKeys()
{
return array_keys($this->_data);
}
+ /**
+ * @see ConfigAbstractStorage::getValues()
+ */
function getValues()
{
return array_values($this->_data);
Modified: plog/trunk/class/config/configfilestorage.class.php
===================================================================
--- plog/trunk/class/config/configfilestorage.class.php 2006-07-26 16:56:56 UTC (rev 3813)
+++ plog/trunk/class/config/configfilestorage.class.php 2006-07-26 17:02:57 UTC (rev 3814)
@@ -258,26 +258,41 @@
return $value;
}
+ /**
+ * @see ConfigAbstractStorage::setValue()
+ */
function setValue( $key, $value )
{
return $this->_props->setValue( $key, $value );
}
+ /**
+ * @see ConfigAbstractStorage::getKeys()
+ */
function getKeys()
{
return $this->_props->getKeys();
}
+ /**
+ * @see ConfigAbstractStorage::getValues()
+ */
function getValues()
{
return $this->_props->getValues();
}
+ /**
+ * @see ConfigAbstractStorage::getAsArray()
+ */
function getAsArray()
{
return $this->_props->getAsArray();
}
+ /**
+ * @see ConfigAbstractStorage::save()
+ */
function save()
{
foreach( $this->_props->getAsArray() as $key => $value ) {
Modified: plog/trunk/class/controller/admincontroller.class.php
===================================================================
--- plog/trunk/class/controller/admincontroller.class.php 2006-07-26 16:56:56 UTC (rev 3813)
+++ plog/trunk/class/controller/admincontroller.class.php 2006-07-26 17:02:57 UTC (rev 3814)
@@ -10,11 +10,13 @@
* \ingroup Controller
*
* Extends the Controller class so that the operation of loading the
- * file with the mappings is done automatically. The default action parameter becomes
+ * file with the mappings for admin.php is done automatically. The default action parameter becomes
* "op" and the file class/controller/admincontrollermap.class.php will be used as the default
* action class map.
*
- * You will rarely need to use this class in real life.
+ * You will rarely need to use this class in real life, see the main Controller class.
+ *
+ * @see Controller
*/
class AdminController extends Controller
{
Modified: plog/trunk/class/controller/blogcontroller.class.php
===================================================================
--- plog/trunk/class/controller/blogcontroller.class.php 2006-07-26 16:56:56 UTC (rev 3813)
+++ plog/trunk/class/controller/blogcontroller.class.php 2006-07-26 17:02:57 UTC (rev 3814)
@@ -12,7 +12,9 @@
* "op" and the file class/controller/controllermap.class.php will be used as the default
* action class map.
*
- * You will rarely need to use this class in real life.
+ * You will rarely need to use this class in real life, see the main Controller class.
+ *
+ * @see Controller
*/
class BlogController extends Controller
{
Modified: plog/trunk/class/controller/sequentialcontroller.class.php
===================================================================
--- plog/trunk/class/controller/sequentialcontroller.class.php 2006-07-26 16:56:56 UTC (rev 3813)
+++ plog/trunk/class/controller/sequentialcontroller.class.php 2006-07-26 17:02:57 UTC (rev 3814)
@@ -13,14 +13,16 @@
* pre-defined sequence. This allows to easily create multi-step forms that are executed
* only in the pre-defined order.
*
- * This controller uses the session to store its current step (so that it can compute the)
- * next step after the next request so support for sessions both on the client side and the
- * server side is required.
+ * This controller uses the session to store its current position in the list of steps/action
+ * and it will use it to compute its next step after the next request. Support for sessions
+ * on both the client side and the server side is required.
*
* The next step in the sequence will be calculated based on the outcome of the action that
* was last executed: if the validate() method or the perform() method both returned true, then
* the controller will proceed to execute the next action. If either of the conditions above
- * was not true, this controller will keep retrying the current step until successful.
+ * was not true, this controller will keep retrying the current step until successful. If you are
+ * having problems with this controller executing the same action class over and over again,
+ * make sure you are not returning 'false' from any of those two methods.
*
* If you'd like to restart the sequence of this controller, please include a "start=1" parameter
* in any request.
Modified: plog/trunk/class/dao/archivelink.class.php
===================================================================
--- plog/trunk/class/dao/archivelink.class.php 2006-07-26 16:56:56 UTC (rev 3813)
+++ plog/trunk/class/dao/archivelink.class.php 2006-07-26 17:02:57 UTC (rev 3814)
@@ -7,6 +7,7 @@
* the number of posts in that month
*
* @private
+ *
* \ingroup DAO
*/
class ArchiveLink extends MyLink
Modified: plog/trunk/class/dao/article.class.php
===================================================================
--- plog/trunk/class/dao/article.class.php 2006-07-26 16:56:56 UTC (rev 3813)
+++ plog/trunk/class/dao/article.class.php 2006-07-26 17:02:57 UTC (rev 3814)
@@ -281,6 +281,11 @@
return $this->_user;
}
+ /**
+ * Returns the identifier of the user who posted this article
+ *
+ * @return An integer
+ */
function getUserId()
{
return $this->_user;
@@ -711,6 +716,11 @@
$this->_timestamp = new Timestamp( $newDate );
}
+ /**
+ * Sets the date in which this article was last modified.
+ *
+ * @param newDate a 14-digit date in SQL's TIMESTAMP format.
+ */
function setModificationDate( $newDate )
{
$this->_modificationDate = $newDate;
@@ -744,7 +754,13 @@
$date = Timestamp::getDateWithOffset( $this->getModificationDate(), -$offset );
return( $date );
}
-
+
+ /**
+ * Returns the date when the post was last modified as a Timestamp object
+ *
+ * @return a Timestamp object
+ * @see Timestamp
+ */
function getModificationTimestamp()
{
return( $this->_modificationTimestamp );
@@ -787,6 +803,9 @@
$this->_date = $this->_timestamp->getTimestamp();
}
+ /**
+ * @private
+ */
function setProperties( $properties )
{
$this->_properties = $properties;
Modified: plog/trunk/class/dao/articlecategory.class.php
===================================================================
--- plog/trunk/class/dao/articlecategory.class.php 2006-07-26 16:56:56 UTC (rev 3813)
+++ plog/trunk/class/dao/articlecategory.class.php 2006-07-26 17:02:57 UTC (rev 3814)
@@ -6,9 +6,7 @@
/**
* \ingroup DAO
*
- * Represents a category. Every post belongs to exactly one category, but categories
- * are also passed to the template as an array, so that they can be displayed
- * in a column... or something :)
+ * Represents an article category.
*/
class ArticleCategory extends DbObject
{
@@ -26,6 +24,20 @@
var $_blog;
var $_mangledName;
+ /**
+ * Creates an article category.
+ *
+ * @param name The name given to the new category
+ * @param url Not used.
+ * @param blogId The id of the blog to which this category id assigned.
+ * @param inMainPage Whether posts belonging to this category should be shown in the front page of the blog or not.
+ * @param description Description of the category, defaults to nothing.
+ * @param numArticles Number of articles in this category, defaults to '0'.
+ * @param properties Not used.
+ * @param id Id assigned to this category in the database, defaults to '-1' and it is ignored for new categories.
+ * @param lastModification Date when this category was last modified.
+ * @param parentId Id of the parent category, not used as of LifeType 1.1.
+ */
function ArticleCategory( $name, $url, $blogId, $inMainPage, $description = "", $numArticles = 0, $properties = Array(), $id = -1, $lastModification=null, $parentId = null)
{
include_once( PLOG_CLASS_PATH."class/data/timestamp.class.php" );
@@ -196,16 +208,33 @@
return( $this->getNumArticles( POST_STATUS_ALL ));
}
+ /**
+ * Returns the number of articles that have a published status in this category
+ *
+ * @return Number of published articles
+ */
function getNumPublishedArticles()
{
return( $this->_numPublishedArticles );
}
-
+
+ /**
+ * Sets the number of articles that have a published status in this category. This method
+ * should usually not be called unless we want to mess up counters.
+ *
+ * @private.
+ */
function setNumPublishedArticles( $num )
{
$this->_numPublishedArticles = $num;
}
-
+
+ /**
+ * Sets the number of articles in this category. This method
+ * should usually not be called unless we want to mess up counters.
+ *
+ * @private.
+ */
function setNumArticles( $num )
{
$this->_numArticles = $num;
@@ -299,11 +328,22 @@
return $this->_lastModification;
}
+ /**
+ * Sets the date in which this category was last modified
+ *
+ * @param newDate a Timestamp object containing the date in which this category was last modified
+ */
function setLastModification( $newDate )
{
$this->_lastModification = $newDate;
}
+ /**
+ * Returns the 'mangled' version of the name of this category, used for generating nicer
+ * links when custom URLs are enabled. It may not work with double-byte languages.
+ *
+ * @return A string containing a 'url-ified' version of the category name
+ */
function getMangledName()
{
if( $this->_mangledName == "" ) {
@@ -313,12 +353,23 @@
return( $this->_mangledName );
}
-
+
+ /**
+ * Sets the 'mangled' version of the name of this category, used for generating nicer
+ * links when custom URLs are enabled.
+ *
+ * @param mangledName A string containing a 'url-ified' version of the category name
+ */
function setMangledName( $mangledName )
{
$this->_mangledName = $mangledName;
}
+ /**
+ * Returns the BlogInfo object to which this category belongs
+ *
+ * @return A BlogInfo object
+ */
function getBlog()
{
if( $this->_blog == null ) {
@@ -330,6 +381,11 @@
return( $this->_blog );
}
+ /**
+ * @private
+ * Those attributes that should not be serialized (not cached) are set to
+ * null.
+ */
function __sleep()
{
$this->_parentCategory = null;
Modified: plog/trunk/class/dao/blogcategories.class.php
===================================================================
--- plog/trunk/class/dao/blogcategories.class.php 2006-07-26 16:56:56 UTC (rev 3813)
+++ plog/trunk/class/dao/blogcategories.class.php 2006-07-26 17:02:57 UTC (rev 3814)
@@ -3,7 +3,12 @@
include_once( PLOG_CLASS_PATH."class/dao/model.class.php" );
include_once( PLOG_CLASS_PATH."class/dao/blogcategory.class.php" );
include_once( PLOG_CLASS_PATH."class/dao/daocacheconstants.properties.php" );
-
+
+ /**
+ * \ingroup DAO
+ *
+ * Provides an interface for working with BlogCategory objects
+ */
class BlogCategories extends Model
{
Modified: plog/trunk/class/dao/globalarticlecategories.class.php
===================================================================
--- plog/trunk/class/dao/globalarticlecategories.class.php 2006-07-26 16:56:56 UTC (rev 3813)
+++ plog/trunk/class/dao/globalarticlecategories.class.php 2006-07-26 17:02:57 UTC (rev 3814)
@@ -4,6 +4,11 @@
include_once( PLOG_CLASS_PATH."class/dao/globalarticlecategory.class.php" );
include_once( PLOG_CLASS_PATH."class/dao/daocacheconstants.properties.php" );
+ /**
+ * \ingroup DAO
+ *
+ * Provides an interface for working with GlobalArticleCategory objects
+ */
class GlobalArticleCategories extends Model
{
Modified: plog/trunk/class/dao/globalarticlecategory.class.php
===================================================================
--- plog/trunk/class/dao/globalarticlecategory.class.php 2006-07-26 16:56:56 UTC (rev 3813)
+++ plog/trunk/class/dao/globalarticlecategory.class.php 2006-07-26 17:02:57 UTC (rev 3814)
@@ -6,7 +6,7 @@
/**
* \ingroup DAO
*
- * Represents a global blog category
+ * Represents a global blog category.
*/
class GlobalArticleCategory extends DbObject
{
Modified: plog/trunk/class/dao/userinfo.class.php
===================================================================
--- plog/trunk/class/dao/userinfo.class.php 2006-07-26 16:56:56 UTC (rev 3813)
+++ plog/trunk/class/dao/userinfo.class.php 2006-07-26 17:02:57 UTC (rev 3814)
@@ -23,6 +23,22 @@
var $_resourcePicture;
var $_status;
+ /**
+ * Constructor. Creates a new UserInfo object with the given information.
+ *
+ * @param username Uniquename assigned to this user. Please use the UsernameValidator class before
+ * assigning a username to make sure that the username complies with the rules set by the administrator
+ * of the site and that it has not been taken. This class does not perform any of these checks.
+ * @param password Unencrypted version of this password (passwords are saved encoded as MD5 strings)
+ * @param email Email address of the new user.
+ * @param aboutMyself Some text describing this user, if any.
+ * @param fullName Full name of this user.
+ * @param resourcePictureId Identifier of the picture used to identify this user, defaults to '0' (none)
+ * @param properties Associative array containing extra custom data, defaults to an empty array if not provided.
+ * @param id Identifier of the user, if known. It will be ignored if this is a new user, as the user id will be
+ * set after calling Users::addUser()
+ * @see Users::addUser()
+ */
function UserInfo( $username, $password, $email, $aboutMyself, $fullName, $resourcePictureId = 0, $properties = Array(), $id = 0 )
{
$this->DbObject();
@@ -63,11 +79,21 @@
return $this->_username;
}
+ /**
+ * Returns the password.
+ *
+ * @param The password
+ */
function getPassword()
{
return $this->_password;
}
-
+
+ /**
+ * Returns the password encoded as an MD5 string.
+ *
+ * @param The password encoded as an MD5 string.
+ */
function getMD5Password()
{
if( strlen( $this->getPassword()) == 32 )
@@ -78,6 +104,9 @@
return( $md5pass );
}
+ /**
+ * @return Returns the identifier assigned to this user.
+ */
function getId()
{
return $this->_id;
Modified: plog/trunk/class/data/captcha/captcha.class.php
===================================================================
--- plog/trunk/class/data/captcha/captcha.class.php 2006-07-26 16:56:56 UTC (rev 3813)
+++ plog/trunk/class/data/captcha/captcha.class.php 2006-07-26 17:02:57 UTC (rev 3814)
@@ -26,7 +26,8 @@
/**
* \ingroup Data
*
- * Class to generate CAPTCHA images, based on Mark Wu's AuthImage plugin.
+ * Class to generate CAPTCHA images, based on Mark Wu's AuthImage plugin. Requires support
+ * for GD built-in.
*
* Usage:
* <pre>
@@ -43,6 +44,15 @@
*/
class Captcha
{
+ /**
+ * Constructor. It takes no parameter but there are several public attributes that
+ * can be set after the constructor has been called:
+ *
+ * - key
+ * - cacheFolder
+ * - expiredTime
+ * - length
+ */
function Captcha()
{
$this->key = CAPTCHA_DEFAULT_KEY;
Modified: plog/trunk/class/data/jalalicalendar.class.php
===================================================================
--- plog/trunk/class/data/jalalicalendar.class.php 2006-07-26 16:56:56 UTC (rev 3813)
+++ plog/trunk/class/data/jalalicalendar.class.php 2006-07-26 17:02:57 UTC (rev 3814)
@@ -1,22 +1,21 @@
<?php
-/**
-\ingroup data
-
-Jalali Date function by Milad Rastian (miladmovie AT yahoo DOT com)
-
-//The main function which convert Gregorian to Jalali calendars is:
-// Copyright (C) 2000 Roozbeh Pournader and Mohammad Toossi
-//you can see complete note of those function in down of the page
-
- AND JALAI DATE FUNCTION
-this function is simillar than date function in PHP
-you can find more about it in http://jdf.farsiprojects.com
- Copyright (C)2003 FARSI PROJECTS GROUP
-*/
-
// lang file must be at the same directory
include_once( PLOG_CLASS_PATH."class/data/jalalicalendarstrings.properties.php" );
+/**
+ * \ingroup data
+ *
+ * Jalali Date function by Milad Rastian (miladmovie AT yahoo DOT com)
+ *
+ * The main function which convert Gregorian to Jalali calendars is:
+ * Copyright (C) 2000 Roozbeh Pournader and Mohammad Toossi
+ * you can see complete note of those function in down of the page
+ *
+ * AND JALAI DATE FUNCTION
+ * this function is simillar than date function in PHP
+ * you can find more about it in http://jdf.farsiprojects.com
+ * Copyright (C)2003 FARSI PROJECTS GROUP
+ */
class JalaliCalendar
{
Modified: plog/trunk/class/data/validator/rules/emailformatrule.class.php
===================================================================
--- plog/trunk/class/data/validator/rules/emailformatrule.class.php 2006-07-26 16:56:56 UTC (rev 3813)
+++ plog/trunk/class/data/validator/rules/emailformatrule.class.php 2006-07-26 17:02:57 UTC (rev 3814)
@@ -1,41 +1,56 @@
-<?php
-
- include_once(PLOG_CLASS_PATH."class/data/validator/rules/regexprule.class.php");
- define( "EMAIL_FORMAT_RULE_REG_EXP", "^[a-z0-9_.+-]+@[a-z0-9]+([.-]?[a-z0-9])+\.[a-z]{2,4}");
-
- define( "ERROR_RULE_EMAIL_FORMAT_WRONG", "error_rule_email_format_wrong");
-
- /**
- * \ingroup Validator_Rules
- *
- * Given an email address, returns true if it looks like a valid email address (if it has the
- * valid format) If not, it will return ERROR_RULE_EMAIL_FORMAT_WRONG
- */
- class EmailFormatRule extends RegExpRule
- {
- /**
- * The constructor does nothing.
- */
- function EmailFormatRule()
- {
- $this->RegExpRule(EMAIL_FORMAT_RULE_REG_EXP, false);
- }
-
- /**
- * Validates the format of the given email address
- */
- function validate($value)
- {
- if (parent::validate($value))
- {
- $this->_setError(false);
- return true;
- }
- else
- {
- $this->_setError(ERROR_RULE_EMAIL_FORMAT_WRONG);
- return false;
- }
- }
- }
+<?php
+
+ include_once(PLOG_CLASS_PATH."class/data/validator/rules/regexprule.class.php");
+
+ define( "ERROR_RULE_EMAIL_FORMAT_WRONG", "error_rule_email_format_wrong");
+
+ /**
+ * \ingroup Validator_Rules
+ *
+ * Given an email address, returns true if it looks like a valid email address (if it has the
+ * valid format) If not, it will return ERROR_RULE_EMAIL_FORMAT_WRONG
+ */
+ class EmailFormatRule extends Rule
+ {
+
+ var $_email;
+
+ /**
+ * The constructor does nothing.
+ */
+ function EmailFormatRule()
+ {
+ $this->Rule();
+ }
+
+ /**
+ * Validates the format of the given email address
+ * Based on PEAR Validate (http://pear.php.net/package/Validate)
+ *
+ * @param value The email address whose format we are going to validate
+ * @return True if the address is a valid one or false otherwise
+ */
+ function validate($value)
+ {
+
+ // the base regexp for address
+ $regex = '&^(?: # recipient:
+ ("\s*(?:[^"\f\n\r\t\v\b\s]+\s*)+")| #1 quoted name
+ ([-\w!\#\$%\&\'*+~/^`|{}]+(?:\.[-\w!\#\$%\&\'*+~/^`|{}]+)*)) #2 OR dot-atom
+ @(((\[)? #3 domain, 4 as IPv4, 5 optionally bracketed
+ (?:(?:(?:(?:25[0-5])|(?:2[0-4][0-9])|(?:[0-1]?[0-9]?[0-9]))\.){3}
+ (?:(?:25[0-5])|(?:2[0-4][0-9])|(?:[0-1]?[0-9]?[0-9]))))(?(5)\])|
+ ((?:[a-z0-9](?:[-a-z0-9]*[a-z0-9])?\.)*[a-z](?:[-a-z0-9]*[a-z0-9])?)) #6 domain as hostname
+ \.((?:[a-z]*[a-z])?) #7 ICANN domain names
+ $&xi';
+
+ if( preg_match($regex, $value) ){
+ $this->_setError(false);
+ return true;
+ } else {
+ $this->_setError(ERROR_RULE_EMAIL_FORMAT_WRONG);
+ return false;
+ }
+ }
+ }
?>
\ No newline at end of file
Modified: plog/trunk/class/data/validator/rules/filteredpatternsrule.class.php
===================================================================
--- plog/trunk/class/data/validator/rules/filteredpatternsrule.class.php 2006-07-26 16:56:56 UTC (rev 3813)
+++ plog/trunk/class/data/validator/rules/filteredpatternsrule.class.php 2006-07-26 17:02:57 UTC (rev 3814)
@@ -4,12 +4,23 @@
define( "DEFAULT_PATTERN_CASE_SENSITIVE", true);
+ /**
+ * \ingroup Validator_Rules
+ *
+ * Given an array with regular expressions, validates that the string passed
+ * as a parameter via the validate() method does not match any of the patterns.
+ */
class FilteredPatternsRule extends Rule
{
var $_filteredPatterns;
/**
- * The constructor does nothing.
+ * Constructor.
+ *
+ * @param filteredPatterns Array containing the regular expressions to check, but please do not use the full format
+ * (i.e. if the pattern is "/^abc/" please do not specify the leading and trailing forward slashes as they will be
+ * automatically added later.
+ * @caseSensitive Whether to treat patterns in a case-sensitive fashion or not.
*/
function FilteredPatternsRule( $filteredPatterns, $caseSensitive = DEFAULT_PATTERN_CASE_SENSITIVE )
{
@@ -20,7 +31,7 @@
}
/**
- * Add function info here
+ * @return Returns true if the case-sensitive mode is enabled or false otherwise
*/
function isCaseSensitive()
{
@@ -28,7 +39,9 @@
}
/**
- * Add function info here
+ * Sets the case sensitive mode.
+ *
+ * @param caseSensitive True to activate the case-sensitive mode or false otherwise
*/
function setCaseSensitive( $caseSensitive = DEFAULT_PATTERN_CASE_SENSITIVE )
{
@@ -36,7 +49,10 @@
}
/**
- * validates that none of the pattern in the given string
+ * Validates that none of the pattern matches the given string
+ *
+ * @param value The string to be checked
+ * @return True if the string does not match any of the patterns or false otherwise
*/
function validate($value)
{
Modified: plog/trunk/class/data/validator/rules/filteredwordsrule.class.php
===================================================================
--- plog/trunk/class/data/validator/rules/filteredwordsrule.class.php 2006-07-26 16:56:56 UTC (rev 3813)
+++ plog/trunk/class/data/validator/rules/filteredwordsrule.class.php 2006-07-26 17:02:57 UTC (rev 3814)
@@ -2,12 +2,20 @@
include_once( PLOG_CLASS_PATH."class/data/validator/rules/rule.class.php");
+ /**
+ * \ingroup Validator_Rules
+ *
+ * Give an array with words, this validation rule checks that the word given as a parameter in the
+ * validate() method does not appear in the list.
+ */
class FilteredWordsRule extends Rule
{
var $_filteredWords;
/**
- * The constructor does nothing.
+ * Constructor.
+ *
+ * @param filteredWords An arary containing the list of words that needs to be checked
*/
function FilteredWordsRule( $filteredWords )
{
@@ -17,7 +25,11 @@
}
/**
- * validates that none of the words in the given string is part of the given string
+ * Validates that the given word does not appear in the array given as a parameter to the
+ * constructor.
+ *
+ * @param value The word to validate
+ * @return True if the word does not appear or false otherwise
*/
function validate($value)
{
Modified: plog/trunk/class/data/validator/rules/regexprule.class.php
===================================================================
--- plog/trunk/class/data/validator/rules/regexprule.class.php 2006-07-26 16:56:56 UTC (rev 3813)
+++ plog/trunk/class/data/validator/rules/regexprule.class.php 2006-07-26 17:02:57 UTC (rev 3814)
@@ -6,13 +6,10 @@
define( "ERROR_RULE_REGEXP_NOT_MATCH", "error_rule_regexp_not_match");
/**
- * This is an implementation of the 'Strategy' pattern as it can be seen
- * http://www.phppatterns.com/index.php/article/articleview/13/1/1/. Here we use
- * this pattern to validate data received from forms. Its is useful since for example
- * we check in many places if a 'postId' is valid or not. We can put the
- * checkings inside the class and simply reuse this class wherever we want. If we ever
- *`change the format of the postId parameter, we only have to change the code of the
- * class that validates it and it will be automatically used everywhere.
+ * \ingroup Validator_Rules
+ *
+ * Implements a rule that checks whether a string matches the given regular expression, supporting
+ * both case sensitive and not sensitive.
*/
class RegExpRule extends Rule
{
@@ -20,7 +17,11 @@
var $_caseSensitive;
/**
- * The constructor does nothing.
+ * Builds the regular expression rule.
+ *
+ * @param regExp The regular expression against which we are going to be matching data.
+ * @param caseSensitive Whether the regular expression will be matched using the case
+ * sensitive mode or not.
*/
function RegExpRule($regExp, $caseSensitive = DEFAULT_RULE_CASE_SENSITIVE)
{
@@ -31,7 +32,7 @@
}
/**
- * Add function info here
+ * @return Returns the regular expression that is being used to validate data
*/
function getRegExp()
{
@@ -39,7 +40,7 @@
}
/**
- * Add function info here
+ * @return Sets the regular expression that will be used to validate data
*/
function setRegExp($regExp)
{
@@ -47,7 +48,7 @@
}
/**
- * Add function info here
+ * @return Returns true if the case-sensitive mode is enabled or false otherwise
*/
function isCaseSensitive()
{
@@ -55,7 +56,9 @@
}
/**
- * Add function info here
+ * Sets the case sensitive mode.
+ *
+ * @param caseSensitive True to activate the case-sensitive mode or false otherwise
*/
function setCaseSensitive($caseSensitive = DEFAULT_RULE_CASE_SENSITIVE)
{
@@ -63,8 +66,11 @@
}
/**
- * Validates the data. Does nothing here and it must be reimplemented by
- * every child class.
+ * Checks whether the given value matches the regular expression that was given as a parameter
+ * to the constructor (or changed later on via the setRegExp method)
+ *
+ * @param value The string that will be validated
+ * @return Returns true if the string matches the regular expression or false otherwise
*/
function validate($value)
{
Modified: plog/trunk/class/data/validator/rules/stringrangerule.class.php
===================================================================
--- plog/trunk/class/data/validator/rules/stringrangerule.class.php 2006-07-26 16:56:56 UTC (rev 3813)
+++ plog/trunk/class/data/validator/rules/stringrangerule.class.php 2006-07-26 17:02:57 UTC (rev 3814)
@@ -8,8 +8,8 @@
/**
* \ingroup Validator_Rules
*
- * Given two values that will be used as lower and upper boundaries of the range,
- * it will validate whether the given value falls within the range.
+ * Given two values that will be used as lower and upper boundaries of the string length,
+ * validates if the length of the given string is between the limits.
*
* It will set the errors ERROR_RULE_TOO_SMALL or ERROR_RULE_TOO_LARGE in case the
* validation is not successful.
Modified: plog/trunk/class/database/pdb/datadict/pdbbasedatadict.class.php
===================================================================
--- plog/trunk/class/database/pdb/datadict/pdbbasedatadict.class.php 2006-07-26 16:56:56 UTC (rev 3813)
+++ plog/trunk/class/database/pdb/datadict/pdbbasedatadict.class.php 2006-07-26 17:02:57 UTC (rev 3814)
@@ -306,9 +306,7 @@
}
}
return $rez;
- }
-
- /**
+ }
/**
* Given a metatype, return its equivalent database type
Modified: plog/trunk/class/database/pdb/pdb.class.php
===================================================================
--- plog/trunk/class/database/pdb/pdb.class.php 2006-07-26 16:56:56 UTC (rev 3813)
+++ plog/trunk/class/database/pdb/pdb.class.php 2006-07-26 17:02:57 UTC (rev 3814)
@@ -2,9 +2,13 @@
/**
* \defgroup PDb
*
- * Since LifeType 1.1, ADOdb is no longer part of LifeType and now all database interaction is handled via PDb
+ * Since LifeType 1.1, ADOdb is no longer part of LifeType and now all database interaction is handled via PDb,
* a much tighter implementation of a database abstraction layer inspired on ADOdb (PDb is like ADOdb, with the
* only difference that only those methods from ADOdb that were used by LifeType's code were implemented)
+ *
+ * The only noticeable difference that may make your code incompatible with this implementation is that the
+ * function NewDataDictionary() used to get a data dictionary in ADOdb has been renamed to
+ * NewPDbDataDictionary() to avoid problems where both ADOdb and PDb have to coexist.
*/
define( "PDB_DRIVER_FOLDER", PLOG_CLASS_PATH."class/database/pdb/drivers/" );
Modified: plog/trunk/class/file/fileproperties.class.php
===================================================================
--- plog/trunk/class/file/fileproperties.class.php 2006-07-26 16:56:56 UTC (rev 3813)
+++ plog/trunk/class/file/fileproperties.class.php 2006-07-26 17:02:57 UTC (rev 3814)
@@ -21,6 +21,11 @@
2 => "/^#\s*(.*)/i",
3 => "/^\/\*(.*)\*\//i" );
+ /**
+ * Constructor of the class
+ *
+ * @param fileName Name of the file where data will be loaded from.
+ */
function FileProperties( $fileName )
{
$this->Properties();
@@ -46,6 +51,9 @@
$this->_contents = $this->_file->readFile();
}
+ /**
+ * @private
+ */
function _removeBlanks( $string, $where = 1 )
{
if( $where == 1 ) { // remove from the beginning
Modified: plog/trunk/class/locale/locale.class.php
===================================================================
--- plog/trunk/class/locale/locale.class.php 2006-07-26 16:56:56 UTC (rev 3813)
+++ plog/trunk/class/locale/locale.class.php 2006-07-26 17:02:57 UTC (rev 3814)
@@ -15,6 +15,9 @@
* The Locales class is the preferred way to load translations from disk since it has
* caching mechanisms so that we don't have to load the data everytime from disk.
*
+ * Please see http://wiki.lifetype.net/index.php/Translating_LifeType for more information regading
+ * how to work with locale files in LifeType.
+ *
* @see Locale
* @see Locales
*/
Modified: plog/trunk/class/logger/loggermanager.class.php
===================================================================
--- plog/trunk/class/logger/loggermanager.class.php 2006-07-26 16:56:56 UTC (rev 3813)
+++ plog/trunk/class/logger/loggermanager.class.php 2006-07-26 17:02:57 UTC (rev 3814)
@@ -16,18 +16,19 @@
*/
/**
- *
* \ingroup logger
*
* The logger manages a bunch of loggers configured in the config/logging.properties.php file.
* By default if no loggers are specified it will create one logger called "default".
* In order to define new loggers, the configuration file has to look like this:
*
+ * <pre>
* $config["logger_name"] = Array(
* "appender" => "name_of_the_appender_class",
* "layout" => "a pattern definition for the log messages",
* "file" => "file_for_fileappender",
* "prio" => "debug" );
+ * </pre>
*
* Where "logger_name" is the identifer that we will use later on in the call to
* LoggerManager::getLogger() later on to retrieve a handle to this particular logger.
Modified: plog/trunk/class/net/http/httpcache.class.php
===================================================================
--- plog/trunk/class/net/http/httpcache.class.php 2006-07-26 16:56:56 UTC (rev 3813)
+++ plog/trunk/class/net/http/httpcache.class.php 2006-07-26 17:02:57 UTC (rev 3814)
@@ -2,7 +2,11 @@
include_once( PLOG_CLASS_PATH."class/net/http/httpvars.class.php" );
-/*
+//In RSS/ATOM feedMode, contains the date of the clients last update.
+$clientCacheDate=0; //Global public variable because PHP4 does not allow conditional arguments by reference
+$_sessionMode=false; //Global private variable
+
+/**
* \ingroup Net_HTTP
* Enable support for HTTP/1.x conditional requests in PHP.
* Goal: Optimisation
@@ -58,11 +62,6 @@
* If you want to distribute this code, please do it as a link to:
* http://alexandre.alapetite.net/doc-alex/php-http-304/
*/
-
-//In RSS/ATOM feedMode, contains the date of the clients last update.
-$clientCacheDate=0; //Global public variable because PHP4 does not allow conditional arguments by reference
-$_sessionMode=false; //Global private variable
-
class HttpCache {
function httpConditional($UnixTimeStamp,$cacheSeconds=0,
$cachePrivacy=0,$feedMode=false,
Modified: plog/trunk/class/object/exception.class.php
===================================================================
--- plog/trunk/class/object/exception.class.php 2006-07-26 16:56:56 UTC (rev 3813)
+++ plog/trunk/class/object/exception.class.php 2006-07-26 17:02:57 UTC (rev 3814)
@@ -1,11 +1,13 @@
<?php
-
+ /**
+ * \defgroup Core
+ */
/**
* \ingroup Core
*
- * PHP Java-style definition of an Exception object-
+ * PHP Java-style definition of an Exception object.
*/
class Exception
{
Modified: plog/trunk/class/summary/controller/summarycontroller.class.php
===================================================================
--- plog/trunk/class/summary/controller/summarycontroller.class.php 2006-07-26 16:56:56 UTC (rev 3813)
+++ plog/trunk/class/summary/controller/summarycontroller.class.php 2006-07-26 17:02:57 UTC (rev 3814)
@@ -8,7 +8,6 @@
* Basic controller for the summary. It specifies the action map as well as as the folder
* where action classes for the summary can be found.
*
- * @author The LifeType Project
* @see Controller
*/
class SummaryController extends Controller
Modified: plog/trunk/class/test/helpers/htmlreporter.class.php
===================================================================
--- plog/trunk/class/test/helpers/htmlreporter.class.php 2006-07-26 16:56:56 UTC (rev 3813)
+++ plog/trunk/class/test/helpers/htmlreporter.class.php 2006-07-26 17:02:57 UTC (rev 3814)
@@ -3,9 +3,11 @@
include_once( PLOG_CLASS_PATH."class/test/PHPUnit/TestResult.php" );
/**
- * \ingroup Tests
+ * \ingroup Test
*
- * A nicer test reporter that generates readable HTML output
+ * A nicer test reporter that generates readable HTML output out of the results
+ * of running a test suite, see runtests.php and the TestRunner class for more
+ * information.
*/
class HTMLReporter
{
Modified: plog/trunk/class/test/helpers/lifetypetestcase.class.php
===================================================================
--- plog/trunk/class/test/helpers/lifetypetestcase.class.php 2006-07-26 16:56:56 UTC (rev 3813)
+++ plog/trunk/class/test/helpers/lifetypetestcase.class.php 2006-07-26 17:02:57 UTC (rev 3814)
@@ -4,10 +4,15 @@
include_once( PLOG_CLASS_PATH."class/net/http/httpclient.class.php" );
/**
- * \ingroup Tests
+ * \ingroup Test
*
* Extends the PHPUnit's TestCase class to provide support for using asserts
- * with HTTP requests.
+ * with HTTP requests. All test suites in LifeType must extend this class instead of
+ * PHPUnit_TestCase.
+ *
+ * Please see http://wiki.lifetype.net/index.php/Unit_Testing_in_LifeType for more
+ * information on how unit testing has been implemented in LifeType and how to create your
+ * own test cases.
*/
class LifeTypeTestCase extends PHPUnit_TestCase
{
Modified: plog/trunk/class/test/testrunner.class.php
===================================================================
--- plog/trunk/class/test/testrunner.class.php 2006-07-26 16:56:56 UTC (rev 3813)
+++ plog/trunk/class/test/testrunner.class.php 2006-07-26 17:02:57 UTC (rev 3814)
@@ -1,26 +1,17 @@
<?php
-
+
/**
- * \addgroup Test
+ * \defgroup Test
*
- * This class takes care of running all unit tests in LifeType, as many as there are. This class
- * process the contents of the class/test/tests/ folder and loads all the classes whose name
- * ends with "_test.class.php" and uses PHPUnit to process them.
+ * Unit testing in LifeType is implemented based on PHPUnit and provides a mechanism for users
+ * who write customizations or work with the LifeType core to make sure that their changes
+ * do not break the behaviour of the code being modified.
*
- * The correct way to use this class is as follows:
- *
- * <pre>
- * $r = new TestRunner();
- * $result = $r->run();
- * print( $result->toHTML());
- * </pre>
- *
- * In order to add new test cases, please reproduce the class/ structure in the class/test/tests folder
- * (so that it is easier to tell which class each one of the tests is taking care of) and call your class
- * ClassThatIsBeingTested_test.class.php. The TestRunner class will load them automatically and execute any
- * methods whose name starts with "test". Please the PHPUnit documentation for more details on how to
- * implement test cases.
- */
+ * Please see http://wiki.lifetype.net/index.php/Unit_Testing_in_LifeType for more information on
+ * how unit testing works with LifeType and how to create your own test cases. If you're only interested
+ * in running the included test cases, please use the runtest.php which you can get from Subversion (it
+ * is not included in final releases as it is only meaningful for developers)
+ */
include_once( PLOG_CLASS_PATH."class/misc/glob.class.php" );
include_once( PLOG_CLASS_PATH."class/file/file.class.php" );
@@ -40,7 +31,29 @@
* Exclude folders, seperated by comma
**/
define( "EXCLUDE_FOLDERS_LIST", ".svn" );
-
+
+
+ /**
+ * \ingroup Test
+ *
+ * This class takes care of running all unit tests in LifeType, as many as there are. This class
+ * process the contents of the class/test/tests/ folder and loads all the classes whose name
+ * ends with "_test.class.php" and uses PHPUnit to process them.
+ *
+ * The correct way to use this class is as follows:
+ *
+ * <pre>
+ * $r = new TestRunner();
+ * $result = $r->run();
+ * print( $result->toHTML());
+ * </pre>
+ *
+ * In order to add new test cases, please reproduce the class/ structure in the class/test/tests folder
+ * (so that it is easier to tell which class each one of the tests is taking care of) and call your class
+ * ClassThatIsBeingTested_test.class.php. The TestRunner class will load them automatically and execute any
+ * methods whose name starts with "test". Please the PHPUnit documentation for more details on how to
+ * implement test cases.
+ */
class TestRunner
{
var $folder;
@@ -49,6 +62,14 @@
var $suite;
var $excludeFolders;
+ /**
+ * Constructor.
+ *
+ * @param folder Where test suites are stored. Defaults to class/test/tests (relative
+ * to PLOG_CLASS_PATH)
+ * @param pattern Pattern that will be used to check whether a file in folder $folder
+ * is a test suite. Defaults to "*_test.class.php"
+ */
function TestRunner( $folder = TEST_CLASS_FOLDER, $pattern = TEST_CLASS_NAME_PATTERN )
{
$this->folder = $folder;
@@ -62,6 +83,9 @@
* Runs a test suite, or all of them if no test suite name is given
*
* @param suite The suite name, "all" or empty to run all suites
+ * @return Returns a PHPUnit_TestResult object containing information about which
+ * test suites were run and their results. Please use the HtmlReporter class to obtain
+ * a nicer report.
*/
function run( $suite = "all" )
{
Modified: plog/trunk/class/test/tests/config/configdbstorage_test.class.php
===================================================================
--- plog/trunk/class/test/tests/config/configdbstorage_test.class.php 2006-07-26 16:56:56 UTC (rev 3813)
+++ plog/trunk/class/test/tests/config/configdbstorage_test.class.php 2006-07-26 17:02:57 UTC (rev 3814)
@@ -4,7 +4,7 @@
include_once( PLOG_CLASS_PATH."class/config/configdbstorage.class.php" );
/**
- * \ingroup Tests
+ * \ingroup Test
*
* Test cases for the Config class, but only the database-based backend, not the file backend
*/
Modified: plog/trunk/class/test/tests/config/configfilestorage_test.class.php
===================================================================
--- plog/trunk/class/test/tests/config/configfilestorage_test.class.php 2006-07-26 16:56:56 UTC (rev 3813)
+++ plog/trunk/class/test/tests/config/configfilestorage_test.class.php 2006-07-26 17:02:57 UTC (rev 3814)
@@ -4,7 +4,7 @@
include_once( PLOG_CLASS_PATH."class/config/configfilestorage.class.php" );
/**
- * \ingroup Tests
+ * \ingroup Test
*
* Test cases for the ConfigFileStorage class.
*
Modified: plog/trunk/class/test/tests/dao/article_test.class.php
===================================================================
--- plog/trunk/class/test/tests/dao/article_test.class.php 2006-07-26 16:56:56 UTC (rev 3813)
+++ plog/trunk/class/test/tests/dao/article_test.class.php 2006-07-26 17:02:57 UTC (rev 3814)
@@ -4,7 +4,7 @@
include_once( PLOG_CLASS_PATH."class/dao/article.class.php" );
/**
- * \ingroup Tests
+ * \ingroup Test
*
* Test cases for the Article class
*/
Modified: plog/trunk/class/test/tests/dao/bloginfo_test.class.php
===================================================================
--- plog/trunk/class/test/tests/dao/bloginfo_test.class.php 2006-07-26 16:56:56 UTC (rev 3813)
+++ plog/trunk/class/test/tests/dao/bloginfo_test.class.php 2006-07-26 17:02:57 UTC (rev 3814)
@@ -6,7 +6,7 @@
include_once( PLOG_CLASS_PATH."class/data/timestamp.class.php" );
/**
- * \ingroup Tests
+ * \ingroup Test
*
* Test cases for the BlogInfo class
*/
Modified: plog/trunk/class/test/tests/data/textfilter_test.class.php
===================================================================
--- plog/trunk/class/test/tests/data/textfilter_test.class.php 2006-07-26 16:56:56 UTC (rev 3813)
+++ plog/trunk/class/test/tests/data/textfilter_test.class.php 2006-07-26 17:02:57 UTC (rev 3814)
@@ -5,7 +5,7 @@
include_once( PLOG_CLASS_PATH."class/config/config.class.php" );
/**
- * \ingroup Tests
+ * \ingroup Test
*
* Test cases for the Textfilter class
*/
Modified: plog/trunk/class/test/tests/data/validator/integervalidator_test.class.php
===================================================================
--- plog/trunk/class/test/tests/data/validator/integervalidator_test.class.php 2006-07-26 16:56:56 UTC (rev 3813)
+++ plog/trunk/class/test/tests/data/validator/integervalidator_test.class.php 2006-07-26 17:02:57 UTC (rev 3814)
@@ -4,7 +4,7 @@
include_once( PLOG_CLASS_PATH."class/data/validator/integervalidator.class.php" );
/**
- * \ingroup Tests
+ * \ingroup Test
*
* Test case for the IntegerValidator class
*/
Modified: plog/trunk/class/test/tests/data/validator/rules/stringrangerule_test.class.php
===================================================================
--- plog/trunk/class/test/tests/data/validator/rules/stringrangerule_test.class.php 2006-07-26 16:56:56 UTC (rev 3813)
+++ plog/trunk/class/test/tests/data/validator/rules/stringrangerule_test.class.php 2006-07-26 17:02:57 UTC (rev 3814)
@@ -4,7 +4,7 @@
include_once( PLOG_CLASS_PATH."class/data/validator/rules/stringrangerule.class.php" );
/**
- * \ingroup Tests
+ * \ingroup Test
*
* Test cases for the StringRangeRule class
*/
Modified: plog/trunk/class/test/tests/data/validator/usernamevalidator_test.class.php
===================================================================
--- plog/trunk/class/test/tests/data/validator/usernamevalidator_test.class.php 2006-07-26 16:56:56 UTC (rev 3813)
+++ plog/trunk/class/test/tests/data/validator/usernamevalidator_test.class.php 2006-07-26 17:02:57 UTC (rev 3814)
@@ -4,7 +4,7 @@
include_once( PLOG_CLASS_PATH."class/data/validator/usernamevalidator.class.php" );
/**
- * \ingroup Tests
+ * \ingroup Test
*
* Test case for the UsernameValidator class
*/
Modified: plog/trunk/class/test/tests/extra/sqlinjection_test.class.php
===================================================================
--- plog/trunk/class/test/tests/extra/sqlinjection_test.class.php 2006-07-26 16:56:56 UTC (rev 3813)
+++ plog/trunk/class/test/tests/extra/sqlinjection_test.class.php 2006-07-26 17:02:57 UTC (rev 3814)
@@ -4,7 +4,7 @@
include_once( PLOG_CLASS_PATH."class/config/config.class.php" );
/**
- * \ingroup Tests
+ * \ingroup Test
*
* Regression test for the SQL injection vulnerabilities that were fixed
* in LT 1.0.5 and 1.0.6.
Modified: plog/trunk/class/test/tests/file/unpacker/zipunpacker_test.class.php
===================================================================
--- plog/trunk/class/test/tests/file/unpacker/zipunpacker_test.class.php 2006-07-26 16:56:56 UTC (rev 3813)
+++ plog/trunk/class/test/tests/file/unpacker/zipunpacker_test.class.php 2006-07-26 17:02:57 UTC (rev 3814)
@@ -7,7 +7,7 @@
define( "PCLZIP_TEST_FILE", PLOG_CLASS_PATH."class/test/tests/file/unpacker/pclziptest.zip" );
/**
- * \ingroup Tests
+ * \ingroup Test
*
* Test case for the PCLZip library, used by the ZipUnpacker class
*/
Modified: plog/trunk/class/test/tests/mail/emailservice_test.class.php
===================================================================
--- plog/trunk/class/test/tests/mail/emailservice_test.class.php 2006-07-26 16:56:56 UTC (rev 3813)
+++ plog/trunk/class/test/tests/mail/emailservice_test.class.php 2006-07-26 17:02:57 UTC (rev 3814)
@@ -4,7 +4,7 @@
include_once( PLOG_CLASS_PATH."class/mail/emailservice.class.php" );
/**
- * \ingroup Tests
+ * \ingroup Test
*
* Test LifeType's email sending functionality
*/
Modified: plog/trunk/class/test/tests/mail/phpmailer/phpmailer_test.class.php
===================================================================
--- plog/trunk/class/test/tests/mail/phpmailer/phpmailer_test.class.php 2006-07-26 16:56:56 UTC (rev 3813)
+++ plog/trunk/class/test/tests/mail/phpmailer/phpmailer_test.class.php 2006-07-26 17:02:57 UTC (rev 3814)
@@ -16,7 +16,10 @@
define( "PHPMAILER_TEST_BASE_FOLDER", PLOG_CLASS_PATH."class/test/tests/mail/phpmailer/" );
/**
- * Performs authentication tests
+ * \ingroup Test
+ *
+ * Original tests from the PHPMailer package, adapted to work with LifeType's own
+ * framework for unit testing.
*/
class phpmailer_Test extends LifeTypeTestCase
{
Modified: plog/trunk/class/test/tests/net/http/httpclient_test.class.php
===================================================================
--- plog/trunk/class/test/tests/net/http/httpclient_test.class.php 2006-07-26 16:56:56 UTC (rev 3813)
+++ plog/trunk/class/test/tests/net/http/httpclient_test.class.php 2006-07-26 17:02:57 UTC (rev 3814)
@@ -5,7 +5,7 @@
include_once( PLOG_CLASS_PATH."class/config/config.class.php" );
/**
- * \ingroup Tests
+ * \ingroup Test
*
* Test case for the Snoopy HTTP client library. It could do with a lot more tests
* but we're only testing the features that we really need in LT (namely some basic
Modified: plog/trunk/class/test/tests/net/url_test.class.php
===================================================================
--- plog/trunk/class/test/tests/net/url_test.class.php 2006-07-26 16:56:56 UTC (rev 3813)
+++ plog/trunk/class/test/tests/net/url_test.class.php 2006-07-26 17:02:57 UTC (rev 3814)
@@ -4,7 +4,7 @@
include_once( PLOG_CLASS_PATH."class/net/url.class.php" );
/**
- * \ingroup Tests
+ * \ingroup Test
*
* Test case for the Url class
*/
Modified: plog/trunk/class/test/tests/summary/action/summaryaction_test.class.php
===================================================================
--- plog/trunk/class/test/tests/summary/action/summaryaction_test.class.php 2006-07-26 16:56:56 UTC (rev 3813)
+++ plog/trunk/class/test/tests/summary/action/summaryaction_test.class.php 2006-07-26 17:02:57 UTC (rev 3814)
@@ -3,7 +3,7 @@
include_once( PLOG_CLASS_PATH."class/test/helpers/lifetypetestcase.class.php" );
/**
- * \ingroup Tests
+ * \ingroup Test
*
* Test case for the SummaryAction class, such as verifying that setting the
* language based on the "lang" parameter in summary.php works as expected
More information about the pLog-svn
mailing list