Adding headers to files.

Formating doc comments

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4668 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
phpnut 2007-03-23 22:11:06 +00:00
parent 3a4a49ef03
commit 44f4d8d6f8
10 changed files with 452 additions and 147 deletions

View file

@ -1,5 +1,37 @@
<?php
/* SVN FILE: $Id$ */
/**
* Short description for file.
*
* Long description for file
*
* PHP versions 4 and 5
*
* CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite>
* Copyright 2005-2007, Cake Software Foundation, Inc.
* 1785 E. Sahara Avenue, Suite 490-204
* Las Vegas, Nevada 89104
*
* Licensed under The Open Group Test Suite License
* Redistributions of files must retain the above copyright notice.
*
* @filesource
* @copyright Copyright 2005-2007, Cake Software Foundation, Inc.
* @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests
* @package cake.tests
* @subpackage cake.tests.fixtures
* @since CakePHP(tm) v 1.2.0.4667
* @version $Revision$
* @modifiedby $LastChangedBy$
* @lastmodified $Date$
* @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License
*/
/**
* Short description for class.
*
* @package cake.tests
* @subpackage cake.tests.fixtures
*/
class ArticleFixture extends CakeTestFixture {
var $name = 'Article';
var $fields = array(

View file

@ -1,5 +1,37 @@
<?php
/* SVN FILE: $Id$ */
/**
* Short description for file.
*
* Long description for file
*
* PHP versions 4 and 5
*
* CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite>
* Copyright 2005-2007, Cake Software Foundation, Inc.
* 1785 E. Sahara Avenue, Suite 490-204
* Las Vegas, Nevada 89104
*
* Licensed under The Open Group Test Suite License
* Redistributions of files must retain the above copyright notice.
*
* @filesource
* @copyright Copyright 2005-2007, Cake Software Foundation, Inc.
* @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests
* @package cake.tests
* @subpackage cake.tests.fixtures
* @since CakePHP(tm) v 1.2.0.4667
* @version $Revision$
* @modifiedby $LastChangedBy$
* @lastmodified $Date$
* @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License
*/
/**
* Short description for class.
*
* @package cake.tests
* @subpackage cake.tests.fixtures
*/
class ArticlesTagFixture extends CakeTestFixture {
var $name = 'ArticlesTag';
var $fields = array(

View file

@ -1,5 +1,37 @@
<?php
/* SVN FILE: $Id$ */
/**
* Short description for file.
*
* Long description for file
*
* PHP versions 4 and 5
*
* CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite>
* Copyright 2005-2007, Cake Software Foundation, Inc.
* 1785 E. Sahara Avenue, Suite 490-204
* Las Vegas, Nevada 89104
*
* Licensed under The Open Group Test Suite License
* Redistributions of files must retain the above copyright notice.
*
* @filesource
* @copyright Copyright 2005-2007, Cake Software Foundation, Inc.
* @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests
* @package cake.tests
* @subpackage cake.tests.fixtures
* @since CakePHP(tm) v 1.2.0.4667
* @version $Revision$
* @modifiedby $LastChangedBy$
* @lastmodified $Date$
* @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License
*/
/**
* Short description for class.
*
* @package cake.tests
* @subpackage cake.tests.fixtures
*/
class AttachmentFixture extends CakeTestFixture {
var $name = 'Attachment';
var $fields = array(

View file

@ -1,5 +1,37 @@
<?php
/* SVN FILE: $Id$ */
/**
* Short description for file.
*
* Long description for file
*
* PHP versions 4 and 5
*
* CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite>
* Copyright 2005-2007, Cake Software Foundation, Inc.
* 1785 E. Sahara Avenue, Suite 490-204
* Las Vegas, Nevada 89104
*
* Licensed under The Open Group Test Suite License
* Redistributions of files must retain the above copyright notice.
*
* @filesource
* @copyright Copyright 2005-2007, Cake Software Foundation, Inc.
* @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests
* @package cake.tests
* @subpackage cake.tests.fixtures
* @since CakePHP(tm) v 1.2.0.4667
* @version $Revision$
* @modifiedby $LastChangedBy$
* @lastmodified $Date$
* @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License
*/
/**
* Short description for class.
*
* @package cake.tests
* @subpackage cake.tests.fixtures
*/
class CategoryFixture extends CakeTestFixture {
var $name = 'Category';
var $fields = array(

View file

@ -1,5 +1,37 @@
<?php
/* SVN FILE: $Id$ */
/**
* Short description for file.
*
* Long description for file
*
* PHP versions 4 and 5
*
* CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite>
* Copyright 2005-2007, Cake Software Foundation, Inc.
* 1785 E. Sahara Avenue, Suite 490-204
* Las Vegas, Nevada 89104
*
* Licensed under The Open Group Test Suite License
* Redistributions of files must retain the above copyright notice.
*
* @filesource
* @copyright Copyright 2005-2007, Cake Software Foundation, Inc.
* @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests
* @package cake.tests
* @subpackage cake.tests.fixtures
* @since CakePHP(tm) v 1.2.0.4667
* @version $Revision$
* @modifiedby $LastChangedBy$
* @lastmodified $Date$
* @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License
*/
/**
* Short description for class.
*
* @package cake.tests
* @subpackage cake.tests.fixtures
*/
class CommentFixture extends CakeTestFixture {
var $name = 'Comment';
var $fields = array(

View file

@ -1,5 +1,37 @@
<?php
/* SVN FILE: $Id$ */
/**
* Short description for file.
*
* Long description for file
*
* PHP versions 4 and 5
*
* CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite>
* Copyright 2005-2007, Cake Software Foundation, Inc.
* 1785 E. Sahara Avenue, Suite 490-204
* Las Vegas, Nevada 89104
*
* Licensed under The Open Group Test Suite License
* Redistributions of files must retain the above copyright notice.
*
* @filesource
* @copyright Copyright 2005-2007, Cake Software Foundation, Inc.
* @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests
* @package cake.tests
* @subpackage cake.tests.fixtures
* @since CakePHP(tm) v 1.2.0.4667
* @version $Revision$
* @modifiedby $LastChangedBy$
* @lastmodified $Date$
* @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License
*/
/**
* Short description for class.
*
* @package cake.tests
* @subpackage cake.tests.fixtures
*/
class TagFixture extends CakeTestFixture {
var $name = 'Tag';
var $fields = array(

View file

@ -1,5 +1,37 @@
<?php
/* SVN FILE: $Id$ */
/**
* Short description for file.
*
* Long description for file
*
* PHP versions 4 and 5
*
* CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite>
* Copyright 2005-2007, Cake Software Foundation, Inc.
* 1785 E. Sahara Avenue, Suite 490-204
* Las Vegas, Nevada 89104
*
* Licensed under The Open Group Test Suite License
* Redistributions of files must retain the above copyright notice.
*
* @filesource
* @copyright Copyright 2005-2007, Cake Software Foundation, Inc.
* @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests
* @package cake.tests
* @subpackage cake.tests.fixtures
* @since CakePHP(tm) v 1.2.0.4667
* @version $Revision$
* @modifiedby $LastChangedBy$
* @lastmodified $Date$
* @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License
*/
/**
* Short description for class.
*
* @package cake.tests
* @subpackage cake.tests.fixtures
*/
class UserFixture extends CakeTestFixture {
var $name = 'User';
var $fields = array(

View file

@ -1,18 +1,48 @@
<?php
/* SVN FILE: $Id$ */
/**
* Short description for file.
*
* Long description for file
*
* PHP versions 4 and 5
*
* CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite>
* Copyright 2005-2007, Cake Software Foundation, Inc.
* 1785 E. Sahara Avenue, Suite 490-204
* Las Vegas, Nevada 89104
*
* Licensed under The Open Group Test Suite License
* Redistributions of files must retain the above copyright notice.
*
* @filesource
* @copyright Copyright 2005-2007, Cake Software Foundation, Inc.
* @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests
* @package cake
* @subpackage cake.cake.tests.libs
* @since CakePHP(tm) v 1.2.0.4667
* @version $Revision$
* @modifiedby $LastChangedBy$
* @lastmodified $Date$
* @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License
*/
require_once CAKE . 'tests' . DS . 'lib' . DS . 'cake_test_model.php';
require_once CAKE . 'tests' . DS . 'lib' . DS . 'cake_test_fixture.php';
vendor('simpletest'.DS.'unit_tester');
/**
* Short description for class.
*
* @package cake
* @subpackage cake.cake.tests.lib
*/
class CakeTestCase extends UnitTestCase {
/**
* Announces the start of a test.
*
* @param string $method Test method just started.
*
* @access public
*/
/**
* Announces the start of a test.
*
* @param string $method Test method just started.
*
* @access public
*/
function before($method) {
parent::before($method);
@ -61,12 +91,11 @@ class CakeTestCase extends UnitTestCase {
}
}
}
/**
* Runs as first test to create tables.
*
* @access public
*/
/**
* Runs as first test to create tables.
*
* @access public
*/
function start() {
if (isset($this->_fixtures) && isset($this->db)) {
foreach($this->_fixtures as $fixture) {
@ -78,12 +107,11 @@ class CakeTestCase extends UnitTestCase {
}
}
}
/**
* Runs as last test to drop tables.
*
* @access public
*/
/**
* Runs as last test to drop tables.
*
* @access public
*/
function end() {
if (isset($this->_fixtures) && isset($this->db)) {
foreach(array_reverse($this->_fixtures) as $fixture) {
@ -96,13 +124,13 @@ class CakeTestCase extends UnitTestCase {
}
}
/**
* Announces the end of a test.
*
* @param string $method Test method just finished.
*
* @access public
*/
/**
* Announces the end of a test.
*
* @param string $method Test method just finished.
*
* @access public
*/
function after($method) {
if (isset($this->_fixtures) && isset($this->db) && !in_array(low($method), array('start', 'end'))) {
foreach($this->_fixtures as $fixture) {
@ -116,15 +144,14 @@ class CakeTestCase extends UnitTestCase {
parent::after($method);
}
/**
* Gets a list of test names. Normally that will be all internal methods that start with the
* name "test". This method should be overridden if you want a different rule.
*
* @return array List of test names.
*
* @access public
*/
/**
* Gets a list of test names. Normally that will be all internal methods that start with the
* name "test". This method should be overridden if you want a different rule.
*
* @return array List of test names.
*
* @access public
*/
function getTests() {
$methods = parent::getTests();
@ -134,12 +161,11 @@ class CakeTestCase extends UnitTestCase {
return $methods;
}
/**
* Load fixtures specified in var $fixtures.
*
* @access private
*/
/**
* Load fixtures specified in var $fixtures.
*
* @access private
*/
function _loadFixtures() {
if (!isset($this->fixtures) || empty($this->fixtures)) {
return;
@ -192,5 +218,4 @@ class CakeTestCase extends UnitTestCase {
}
}
}
?>

View file

@ -1,15 +1,46 @@
<?php
/* SVN FILE: $Id$ */
/**
* Short description for file.
*
* Long description for file
*
* PHP versions 4 and 5
*
* CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite>
* Copyright 2005-2007, Cake Software Foundation, Inc.
* 1785 E. Sahara Avenue, Suite 490-204
* Las Vegas, Nevada 89104
*
* Licensed under The Open Group Test Suite License
* Redistributions of files must retain the above copyright notice.
*
* @filesource
* @copyright Copyright 2005-2007, Cake Software Foundation, Inc.
* @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests
* @package cake
* @subpackage cake.cake.tests.libs
* @since CakePHP(tm) v 1.2.0.4667
* @version $Revision$
* @modifiedby $LastChangedBy$
* @lastmodified $Date$
* @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License
*/
/**
* Short description for class.
*
* @package cake
* @subpackage cake.cake.tests.lib
*/
class CakeTestFixture extends Object {
var $db = null;
/**
* Instantiate the fixture.
*
* @param object Cake's DBO driver (e.g: DboMysql).
*
* @access public
*/
/**
* Instantiate the fixture.
*
* @param object Cake's DBO driver (e.g: DboMysql).
*
* @access public
*/
function __construct(&$db) {
$this->db =& $db;
@ -25,14 +56,13 @@ class CakeTestFixture extends Object {
$this->primaryKey = array( $this->primaryKey );
}
}
/**
* Run before all tests execute, should return SQL statement to create table for this fixture.
*
* @return string SQL CREATE TABLE statement, false if not applicable.
*
* @access public
*/
/**
* Run before all tests execute, should return SQL statement to create table for this fixture.
*
* @return string SQL CREATE TABLE statement, false if not applicable.
*
* @access public
*/
function create() {
if (!isset($this->_create)) {
if (!isset($this->fields) || empty($this->fields)) {
@ -77,14 +107,13 @@ class CakeTestFixture extends Object {
return $this->_create;
}
/**
* Run after all tests executed, should return SQL statement to drop table for this fixture.
*
* @return string SQL DROP TABLE statement, false if not applicable.
*
* @access public
*/
/**
* Run after all tests executed, should return SQL statement to drop table for this fixture.
*
* @return string SQL DROP TABLE statement, false if not applicable.
*
* @access public
*/
function drop() {
if (!isset($this->_drop)) {
$this->_drop = 'DROP TABLE ' . $this->db->name($this->db->config['prefix'] . $this->table);
@ -92,14 +121,13 @@ class CakeTestFixture extends Object {
return $this->_drop;
}
/**
* Run after each tests is executed, should return SQL statement to empty of records the table for this fixture.
*
* @return string SQL TRUNCATE TABLE statement, false if not applicable.
*
* @access public
*/
/**
* Run after each tests is executed, should return SQL statement to empty of records the table for this fixture.
*
* @return string SQL TRUNCATE TABLE statement, false if not applicable.
*
* @access public
*/
function truncate() {
if (!isset($this->_truncate)) {
$this->_truncate = 'TRUNCATE ' . $this->db->name($this->db->config['prefix'] . $this->table);
@ -107,14 +135,13 @@ class CakeTestFixture extends Object {
return $this->_truncate;
}
/**
* Run before each tests is executed, should return a set of SQL statements to insert records for the table of this fixture.
*
* @return array SQL INSERT statements, empty array if not applicable.
*
* @access public
*/
/**
* Run before each tests is executed, should return a set of SQL statements to insert records for the table of this fixture.
*
* @return array SQL INSERT statements, empty array if not applicable.
*
* @access public
*/
function insert() {
if (!isset($this->_insert)) {
$inserts = array();
@ -150,5 +177,4 @@ class CakeTestFixture extends Object {
return $this->_insert;
}
}
?>

View file

@ -1,9 +1,39 @@
<?php
/* SVN FILE: $Id$ */
/**
* Short description for file.
*
* Long description for file
*
* PHP versions 4 and 5
*
* CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite>
* Copyright 2005-2007, Cake Software Foundation, Inc.
* 1785 E. Sahara Avenue, Suite 490-204
* Las Vegas, Nevada 89104
*
* Licensed under The Open Group Test Suite License
* Redistributions of files must retain the above copyright notice.
*
* @filesource
* @copyright Copyright 2005-2007, Cake Software Foundation, Inc.
* @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests
* @package cake
* @subpackage cake.cake.tests.libs
* @since CakePHP(tm) v 1.2.0.4667
* @version $Revision$
* @modifiedby $LastChangedBy$
* @lastmodified $Date$
* @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License
*/
require_once LIBS.'model'.DS.'model.php';
/**
* Short description for class.
*
* @package cake
* @subpackage cake.cake.tests.lib
*/
class CakeTestModel extends Model {
var $useDbConfig = 'test_suite';
}
?>