mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Merge pull request #1070 from dereuromark/2.3-cleanup
fix doc block endings
This commit is contained in:
commit
ead469fff3
36 changed files with 82 additions and 82 deletions
|
@ -32,7 +32,7 @@ abstract class CacheEngine {
|
|||
* prefixes to be prepeded to every key in this cache engine
|
||||
*
|
||||
* @var string
|
||||
**/
|
||||
*/
|
||||
protected $_groupPrefix = null;
|
||||
|
||||
/**
|
||||
|
|
|
@ -30,7 +30,7 @@ class ApcEngine extends CacheEngine {
|
|||
* (prefixed witht the global configuration prefix)
|
||||
*
|
||||
* @var array
|
||||
**/
|
||||
*/
|
||||
protected $_compiledGroupNames = array();
|
||||
|
||||
/**
|
||||
|
@ -144,7 +144,7 @@ class ApcEngine extends CacheEngine {
|
|||
* the group accordingly.
|
||||
*
|
||||
* @return array
|
||||
**/
|
||||
*/
|
||||
public function groups() {
|
||||
if (empty($this->_compiledGroupNames)) {
|
||||
foreach ($this->settings['groups'] as $group) {
|
||||
|
@ -176,7 +176,7 @@ class ApcEngine extends CacheEngine {
|
|||
* old values will remain in storage until they expire.
|
||||
*
|
||||
* @return boolean success
|
||||
**/
|
||||
*/
|
||||
public function clearGroup($group) {
|
||||
apc_inc($this->settings['prefix'] . $group, 1, $success);
|
||||
return $success;
|
||||
|
|
|
@ -358,7 +358,7 @@ class FileEngine extends CacheEngine {
|
|||
* Recursively deletes all files under any directory named as $group
|
||||
*
|
||||
* @return boolean success
|
||||
**/
|
||||
*/
|
||||
public function clearGroup($group) {
|
||||
$directoryIterator = new RecursiveDirectoryIterator($this->settings['path']);
|
||||
$contents = new RecursiveIteratorIterator($directoryIterator, RecursiveIteratorIterator::CHILD_FIRST);
|
||||
|
|
|
@ -32,7 +32,7 @@ class MemcacheEngine extends CacheEngine {
|
|||
* (prefixed witht the global configuration prefix)
|
||||
*
|
||||
* @var array
|
||||
**/
|
||||
*/
|
||||
protected $_compiledGroupNames = array();
|
||||
|
||||
/**
|
||||
|
@ -251,7 +251,7 @@ class MemcacheEngine extends CacheEngine {
|
|||
* the group accordingly.
|
||||
*
|
||||
* @return array
|
||||
**/
|
||||
*/
|
||||
public function groups() {
|
||||
if (empty($this->_compiledGroupNames)) {
|
||||
foreach ($this->settings['groups'] as $group) {
|
||||
|
@ -284,7 +284,7 @@ class MemcacheEngine extends CacheEngine {
|
|||
* old values will remain in storage until they expire.
|
||||
*
|
||||
* @return boolean success
|
||||
**/
|
||||
*/
|
||||
public function clearGroup($group) {
|
||||
return (bool)$this->_Memcache->increment($this->settings['prefix'] . $group);
|
||||
}
|
||||
|
|
|
@ -186,7 +186,7 @@ class RedisEngine extends CacheEngine {
|
|||
* the group accordingly.
|
||||
*
|
||||
* @return array
|
||||
**/
|
||||
*/
|
||||
public function groups() {
|
||||
$result = array();
|
||||
foreach ($this->settings['groups'] as $group) {
|
||||
|
@ -205,7 +205,7 @@ class RedisEngine extends CacheEngine {
|
|||
* old values will remain in storage until they expire.
|
||||
*
|
||||
* @return boolean success
|
||||
**/
|
||||
*/
|
||||
public function clearGroup($group) {
|
||||
return (bool)$this->_Redis->incr($this->settings['prefix'] . $group);
|
||||
}
|
||||
|
@ -214,7 +214,7 @@ class RedisEngine extends CacheEngine {
|
|||
* Disconnects from the redis server
|
||||
*
|
||||
* @return void
|
||||
**/
|
||||
*/
|
||||
public function __destruct() {
|
||||
if (!$this->settings['persistent']) {
|
||||
$this->_Redis->close();
|
||||
|
|
|
@ -31,7 +31,7 @@ class WincacheEngine extends CacheEngine {
|
|||
* (prefixed witht the global configuration prefix)
|
||||
*
|
||||
* @var array
|
||||
**/
|
||||
*/
|
||||
protected $_compiledGroupNames = array();
|
||||
|
||||
/**
|
||||
|
@ -149,7 +149,7 @@ class WincacheEngine extends CacheEngine {
|
|||
* the group accordingly.
|
||||
*
|
||||
* @return array
|
||||
**/
|
||||
*/
|
||||
public function groups() {
|
||||
if (empty($this->_compiledGroupNames)) {
|
||||
foreach ($this->settings['groups'] as $group) {
|
||||
|
@ -181,7 +181,7 @@ class WincacheEngine extends CacheEngine {
|
|||
* old values will remain in storage until they expire.
|
||||
*
|
||||
* @return boolean success
|
||||
**/
|
||||
*/
|
||||
public function clearGroup($group) {
|
||||
$success = null;
|
||||
wincache_ucache_inc($this->settings['prefix'] . $group, 1, $success);
|
||||
|
|
|
@ -146,7 +146,7 @@ class XcacheEngine extends CacheEngine {
|
|||
* the group accordingly.
|
||||
*
|
||||
* @return array
|
||||
**/
|
||||
*/
|
||||
public function groups() {
|
||||
$result = array();
|
||||
foreach ($this->settings['groups'] as $group) {
|
||||
|
@ -165,7 +165,7 @@ class XcacheEngine extends CacheEngine {
|
|||
* old values will remain in storage until they expire.
|
||||
*
|
||||
* @return boolean success
|
||||
**/
|
||||
*/
|
||||
public function clearGroup($group) {
|
||||
return (bool)xcache_inc($this->settings['prefix'] . $group, 1);
|
||||
}
|
||||
|
|
|
@ -826,7 +826,7 @@ class Shell extends Object {
|
|||
*
|
||||
* @param boolean $enable wheter to enable CakeLog output or not
|
||||
* @return void
|
||||
**/
|
||||
*/
|
||||
protected function _useLogger($enable = true) {
|
||||
if (!$enable) {
|
||||
CakeLog::drop('stdout');
|
||||
|
|
|
@ -268,7 +268,7 @@ class RequestHandlerComponent extends Component {
|
|||
*
|
||||
* @params Controller $controller
|
||||
* @return boolean false if the render process should be aborted
|
||||
**/
|
||||
*/
|
||||
public function beforeRender(Controller $controller) {
|
||||
if ($this->settings['checkHttpCache'] && $this->response->checkNotModified($this->request)) {
|
||||
return false;
|
||||
|
|
|
@ -466,7 +466,7 @@ class ModelValidator implements ArrayAccess, IteratorAggregate, Countable {
|
|||
*
|
||||
* @param string $field name of the field to check
|
||||
* @return boolean
|
||||
**/
|
||||
*/
|
||||
public function offsetExists($field) {
|
||||
$this->_parseRules();
|
||||
return isset($this->_fields[$field]);
|
||||
|
@ -477,7 +477,7 @@ class ModelValidator implements ArrayAccess, IteratorAggregate, Countable {
|
|||
*
|
||||
* @param string $field name of the field to check
|
||||
* @return CakeValidationSet
|
||||
**/
|
||||
*/
|
||||
public function offsetGet($field) {
|
||||
$this->_parseRules();
|
||||
return $this->_fields[$field];
|
||||
|
@ -489,7 +489,7 @@ class ModelValidator implements ArrayAccess, IteratorAggregate, Countable {
|
|||
* @param string $field name of the field to set
|
||||
* @param array|CakeValidationSet $rules set of rules to apply to field
|
||||
* @return void
|
||||
**/
|
||||
*/
|
||||
public function offsetSet($field, $rules) {
|
||||
$this->_parseRules();
|
||||
if (!$rules instanceof CakeValidationSet) {
|
||||
|
@ -505,7 +505,7 @@ class ModelValidator implements ArrayAccess, IteratorAggregate, Countable {
|
|||
*
|
||||
* @param string $field name of the field to unset
|
||||
* @return void
|
||||
**/
|
||||
*/
|
||||
public function offsetUnset($field) {
|
||||
$this->_parseRules();
|
||||
unset($this->_fields[$field]);
|
||||
|
@ -515,7 +515,7 @@ class ModelValidator implements ArrayAccess, IteratorAggregate, Countable {
|
|||
* Returns an iterator for each of the fields to be validated
|
||||
*
|
||||
* @return ArrayIterator
|
||||
**/
|
||||
*/
|
||||
public function getIterator() {
|
||||
$this->_parseRules();
|
||||
return new ArrayIterator($this->_fields);
|
||||
|
@ -525,7 +525,7 @@ class ModelValidator implements ArrayAccess, IteratorAggregate, Countable {
|
|||
* Returns the number of fields having validation rules
|
||||
*
|
||||
* @return int
|
||||
**/
|
||||
*/
|
||||
public function count() {
|
||||
$this->_parseRules();
|
||||
return count($this->_fields);
|
||||
|
@ -553,7 +553,7 @@ class ModelValidator implements ArrayAccess, IteratorAggregate, Countable {
|
|||
* @param string|array|CakeValidationSet $name name of the rule to be added or list of rules for the field
|
||||
* @param array|CakeValidationRule $rule or list of rules to be added to the field's rule set
|
||||
* @return ModelValidator this instance
|
||||
**/
|
||||
*/
|
||||
public function add($field, $name, $rule = null) {
|
||||
$this->_parseRules();
|
||||
if ($name instanceof CakeValidationSet) {
|
||||
|
@ -592,7 +592,7 @@ class ModelValidator implements ArrayAccess, IteratorAggregate, Countable {
|
|||
* @param string $field The name of the field from wich the rule will be removed
|
||||
* @param string $rule the name of the rule to be removed
|
||||
* @return ModelValidator this instance
|
||||
**/
|
||||
*/
|
||||
public function remove($field, $rule = null) {
|
||||
$this->_parseRules();
|
||||
if ($rule === null) {
|
||||
|
|
|
@ -41,14 +41,14 @@ class CakeValidationSet implements ArrayAccess, IteratorAggregate, Countable {
|
|||
* List of methods available for validation
|
||||
*
|
||||
* @var array
|
||||
**/
|
||||
*/
|
||||
protected $_methods = array();
|
||||
|
||||
/**
|
||||
* I18n domain for validation messages.
|
||||
*
|
||||
* @var string
|
||||
**/
|
||||
*/
|
||||
protected $_validationDomain = null;
|
||||
|
||||
/**
|
||||
|
@ -96,7 +96,7 @@ class CakeValidationSet implements ArrayAccess, IteratorAggregate, Countable {
|
|||
*
|
||||
* @param array $methods Methods list
|
||||
* @return void
|
||||
**/
|
||||
*/
|
||||
public function setMethods(&$methods) {
|
||||
$this->_methods =& $methods;
|
||||
}
|
||||
|
@ -151,7 +151,7 @@ class CakeValidationSet implements ArrayAccess, IteratorAggregate, Countable {
|
|||
* Resets interal state for all validation rules in this set
|
||||
*
|
||||
* @return void
|
||||
**/
|
||||
*/
|
||||
public function reset() {
|
||||
foreach ($this->getRules() as $rule) {
|
||||
$rule->reset();
|
||||
|
@ -310,7 +310,7 @@ class CakeValidationSet implements ArrayAccess, IteratorAggregate, Countable {
|
|||
*
|
||||
* @param string $index name of the rule
|
||||
* @return boolean
|
||||
**/
|
||||
*/
|
||||
public function offsetExists($index) {
|
||||
return isset($this->_rules[$index]);
|
||||
}
|
||||
|
@ -320,7 +320,7 @@ class CakeValidationSet implements ArrayAccess, IteratorAggregate, Countable {
|
|||
*
|
||||
* @param string $index name of the rule
|
||||
* @return CakeValidationRule
|
||||
**/
|
||||
*/
|
||||
public function offsetGet($index) {
|
||||
return $this->_rules[$index];
|
||||
}
|
||||
|
@ -330,7 +330,7 @@ class CakeValidationSet implements ArrayAccess, IteratorAggregate, Countable {
|
|||
*
|
||||
* @param string $index name of the rule
|
||||
* @param CakeValidationRule|array rule to add to $index
|
||||
**/
|
||||
*/
|
||||
public function offsetSet($index, $rule) {
|
||||
$this->setRule($index, $rule);
|
||||
}
|
||||
|
@ -340,7 +340,7 @@ class CakeValidationSet implements ArrayAccess, IteratorAggregate, Countable {
|
|||
*
|
||||
* @param string $index name of the rule
|
||||
* @return void
|
||||
**/
|
||||
*/
|
||||
public function offsetUnset($index) {
|
||||
unset($this->_rules[$index]);
|
||||
}
|
||||
|
@ -349,7 +349,7 @@ class CakeValidationSet implements ArrayAccess, IteratorAggregate, Countable {
|
|||
* Returns an iterator for each of the rules to be applied
|
||||
*
|
||||
* @return ArrayIterator
|
||||
**/
|
||||
*/
|
||||
public function getIterator() {
|
||||
return new ArrayIterator($this->_rules);
|
||||
}
|
||||
|
@ -358,7 +358,7 @@ class CakeValidationSet implements ArrayAccess, IteratorAggregate, Countable {
|
|||
* Returns the number of rules in this set
|
||||
*
|
||||
* @return int
|
||||
**/
|
||||
*/
|
||||
public function count() {
|
||||
return count($this->_rules);
|
||||
}
|
||||
|
|
|
@ -941,7 +941,7 @@ class CakeResponse {
|
|||
* conflicting headers
|
||||
*
|
||||
* @return void
|
||||
**/
|
||||
*/
|
||||
public function notModified() {
|
||||
$this->statusCode(304);
|
||||
$this->body('');
|
||||
|
@ -968,7 +968,7 @@ class CakeResponse {
|
|||
* @param string|array $cacheVariances a single Vary string or a array
|
||||
* containig the list for variances.
|
||||
* @return array
|
||||
**/
|
||||
*/
|
||||
public function vary($cacheVariances = null) {
|
||||
if ($cacheVariances !== null) {
|
||||
$cacheVariances = (array)$cacheVariances;
|
||||
|
@ -1000,7 +1000,7 @@ class CakeResponse {
|
|||
* @param boolean $weak whether the response is semantically the same as
|
||||
* other with th same hash or not
|
||||
* @return string
|
||||
**/
|
||||
*/
|
||||
public function etag($tag = null, $weak = false) {
|
||||
if ($tag !== null) {
|
||||
$this->_headers['Etag'] = sprintf('%s"%s"', ($weak) ? 'W/' : null, $tag);
|
||||
|
|
|
@ -31,7 +31,7 @@ abstract class DispatcherFilter implements CakeEventListener {
|
|||
* Default priority for all methods in this filter
|
||||
*
|
||||
* @var int
|
||||
**/
|
||||
*/
|
||||
public $priority = 10;
|
||||
|
||||
/**
|
||||
|
@ -42,7 +42,7 @@ abstract class DispatcherFilter implements CakeEventListener {
|
|||
* Override this method at will to only listen to the events you are interested in.
|
||||
*
|
||||
* @return array
|
||||
**/
|
||||
*/
|
||||
public function implementedEvents() {
|
||||
return array(
|
||||
'Dispatcher.beforeDispatch' => array('callable' => 'beforeDispatch', 'priority' => $this->priority),
|
||||
|
@ -65,7 +65,7 @@ abstract class DispatcherFilter implements CakeEventListener {
|
|||
* @param CakeEvent $event container object having the `request`, `response` and `additionalParams`
|
||||
* keys in the data property.
|
||||
* @return CakeResponse|boolean
|
||||
**/
|
||||
*/
|
||||
public function beforeDispatch(CakeEvent $event) {
|
||||
}
|
||||
|
||||
|
@ -80,7 +80,7 @@ abstract class DispatcherFilter implements CakeEventListener {
|
|||
* @param CakeEvent $event container object having the `request` and `response`
|
||||
* keys in the data property.
|
||||
* @return mixed boolean to stop the event dispatching or null to continue
|
||||
**/
|
||||
*/
|
||||
public function afterDispatch(CakeEvent $event) {
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ class AssetDispatcher extends DispatcherFilter {
|
|||
* This filter should run before the request gets parsed by router
|
||||
*
|
||||
* @var int
|
||||
**/
|
||||
*/
|
||||
public $priority = 9;
|
||||
|
||||
/**
|
||||
|
|
|
@ -253,7 +253,7 @@ class ApcEngineTest extends CakeTestCase {
|
|||
* Test clearing a cache group
|
||||
*
|
||||
* @return void
|
||||
**/
|
||||
*/
|
||||
public function testGroupClear() {
|
||||
Cache::config('apc_groups', array(
|
||||
'engine' => 'Apc',
|
||||
|
|
|
@ -428,7 +428,7 @@ class FileEngineTest extends CakeTestCase {
|
|||
* Test clearing a cache group
|
||||
*
|
||||
* @return void
|
||||
**/
|
||||
*/
|
||||
public function testGroupClear() {
|
||||
Cache::config('file_groups', array('engine' => 'File', 'duration' => 3600, 'groups' => array('group_a', 'group_b')));
|
||||
Cache::config('file_groups2', array('engine' => 'File', 'duration' => 3600, 'groups' => array('group_b')));
|
||||
|
|
|
@ -459,7 +459,7 @@ class MemcacheEngineTest extends CakeTestCase {
|
|||
* Test clearing a cache group
|
||||
*
|
||||
* @return void
|
||||
**/
|
||||
*/
|
||||
public function testGroupClear() {
|
||||
Cache::config('memcache_groups', array(
|
||||
'engine' => 'Memcache',
|
||||
|
|
|
@ -316,7 +316,7 @@ class RegisEngineTest extends CakeTestCase {
|
|||
* Test clearing a cache group
|
||||
*
|
||||
* @return void
|
||||
**/
|
||||
*/
|
||||
public function testGroupClear() {
|
||||
Cache::config('redis_groups', array(
|
||||
'engine' => 'Redis',
|
||||
|
|
|
@ -243,7 +243,7 @@ class WincacheEngineTest extends CakeTestCase {
|
|||
* Test clearing a cache group
|
||||
*
|
||||
* @return void
|
||||
**/
|
||||
*/
|
||||
public function testGroupClear() {
|
||||
Cache::config('wincache_groups', array(
|
||||
'engine' => 'Wincache',
|
||||
|
|
|
@ -252,7 +252,7 @@ class XcacheEngineTest extends CakeTestCase {
|
|||
* Test clearing a cache group
|
||||
*
|
||||
* @return void
|
||||
**/
|
||||
*/
|
||||
public function testGroupClear() {
|
||||
Cache::config('xcache_groups', array(
|
||||
'engine' => 'Xcache',
|
||||
|
|
|
@ -848,7 +848,7 @@ TEXT;
|
|||
* Tests that _useLogger works properly
|
||||
*
|
||||
* @return void
|
||||
**/
|
||||
*/
|
||||
public function testProtectedUseLogger() {
|
||||
CakeLog::drop('stdout');
|
||||
CakeLog::drop('stderr');
|
||||
|
|
|
@ -863,7 +863,7 @@ class RequestHandlerComponentTest extends CakeTestCase {
|
|||
* Test checkNotModified method
|
||||
*
|
||||
* @return void
|
||||
**/
|
||||
*/
|
||||
public function testCheckNotModifiedByEtagStar() {
|
||||
$_SERVER['HTTP_IF_NONE_MATCH'] = '*';
|
||||
$RequestHandler = $this->getMock('RequestHandlerComponent', array('_stop'), array(&$this->Controller->Components));
|
||||
|
@ -877,7 +877,7 @@ class RequestHandlerComponentTest extends CakeTestCase {
|
|||
* Test checkNotModified method
|
||||
*
|
||||
* @return void
|
||||
**/
|
||||
*/
|
||||
public function testCheckNotModifiedByEtagExact() {
|
||||
$_SERVER['HTTP_IF_NONE_MATCH'] = 'W/"something", "other"';
|
||||
$RequestHandler = $this->getMock('RequestHandlerComponent', array('_stop'), array(&$this->Controller->Components));
|
||||
|
@ -891,7 +891,7 @@ class RequestHandlerComponentTest extends CakeTestCase {
|
|||
* Test checkNotModified method
|
||||
*
|
||||
* @return void
|
||||
**/
|
||||
*/
|
||||
public function testCheckNotModifiedByEtagAndTime() {
|
||||
$_SERVER['HTTP_IF_NONE_MATCH'] = 'W/"something", "other"';
|
||||
$_SERVER['HTTP_IF_MODIFIED_SINCE'] = '2012-01-01 00:00:00';
|
||||
|
@ -907,7 +907,7 @@ class RequestHandlerComponentTest extends CakeTestCase {
|
|||
* Test checkNotModified method
|
||||
*
|
||||
* @return void
|
||||
**/
|
||||
*/
|
||||
public function testCheckNotModifiedNoInfo() {
|
||||
$RequestHandler = $this->getMock('RequestHandlerComponent', array('_stop'), array(&$this->Controller->Components));
|
||||
$RequestHandler->response = $this->getMock('CakeResponse', array('notModified'));
|
||||
|
|
|
@ -164,7 +164,7 @@ class CakeLogTest extends CakeTestCase {
|
|||
* explicit tests for drop()
|
||||
*
|
||||
* @return void
|
||||
**/
|
||||
*/
|
||||
public function testDrop() {
|
||||
CakeLog::config('file', array(
|
||||
'engine' => 'FileLog',
|
||||
|
|
|
@ -950,7 +950,7 @@ class DboSourceTest extends CakeTestCase {
|
|||
* Tests that transaction commands are logged
|
||||
*
|
||||
* @return void
|
||||
**/
|
||||
*/
|
||||
public function testTransactionLogging() {
|
||||
$conn = $this->getMock('MockPDO');
|
||||
$db = new DboTestSource;
|
||||
|
|
|
@ -2438,7 +2438,7 @@ class ModelIntegrationTest extends BaseModelTest {
|
|||
* does not trigger any calls on any datasource
|
||||
*
|
||||
* @return void
|
||||
**/
|
||||
*/
|
||||
public function testSchemaNoDB() {
|
||||
$model = $this->getMock('Article', array('getDataSource'));
|
||||
$model->useTable = false;
|
||||
|
|
|
@ -2177,7 +2177,7 @@ class ModelValidationTest extends BaseModelTest {
|
|||
* after a presentation made to show off this new feature
|
||||
*
|
||||
* @return void
|
||||
**/
|
||||
*/
|
||||
public function testDynamicValidationRuleBuilding() {
|
||||
$model = new Article;
|
||||
$validator = $model->validator();
|
||||
|
|
|
@ -30,7 +30,7 @@ class CakeValidationRuleTest extends CakeTestCase {
|
|||
* Auxiliary method to test custom validators
|
||||
*
|
||||
* @return boolean
|
||||
**/
|
||||
*/
|
||||
public function myTestRule() {
|
||||
return false;
|
||||
}
|
||||
|
@ -39,7 +39,7 @@ class CakeValidationRuleTest extends CakeTestCase {
|
|||
* Auxiliary method to test custom validators
|
||||
*
|
||||
* @return boolean
|
||||
**/
|
||||
*/
|
||||
public function myTestRule2() {
|
||||
return true;
|
||||
}
|
||||
|
@ -48,7 +48,7 @@ class CakeValidationRuleTest extends CakeTestCase {
|
|||
* Auxiliary method to test custom validators
|
||||
*
|
||||
* @return string
|
||||
**/
|
||||
*/
|
||||
public function myTestRule3() {
|
||||
return 'string';
|
||||
}
|
||||
|
|
|
@ -4976,7 +4976,7 @@ class CustomArticle extends AppModel {
|
|||
* Alters title data
|
||||
*
|
||||
* @return void
|
||||
**/
|
||||
*/
|
||||
public function beforeValidate($options = array()) {
|
||||
$this->data[$this->alias]['title'] = 'foo';
|
||||
if ($this->findMethods['unPublished'] === true) {
|
||||
|
|
|
@ -848,7 +848,7 @@ class CakeResponseTest extends CakeTestCase {
|
|||
* Test checkNotModified method
|
||||
*
|
||||
* @return void
|
||||
**/
|
||||
*/
|
||||
public function testCheckNotModifiedByEtagStar() {
|
||||
$_SERVER['HTTP_IF_NONE_MATCH'] = '*';
|
||||
$response = $this->getMock('CakeResponse', array('notModified'));
|
||||
|
@ -861,7 +861,7 @@ class CakeResponseTest extends CakeTestCase {
|
|||
* Test checkNotModified method
|
||||
*
|
||||
* @return void
|
||||
**/
|
||||
*/
|
||||
public function testCheckNotModifiedByEtagExact() {
|
||||
$_SERVER['HTTP_IF_NONE_MATCH'] = 'W/"something", "other"';
|
||||
$response = $this->getMock('CakeResponse', array('notModified'));
|
||||
|
@ -874,7 +874,7 @@ class CakeResponseTest extends CakeTestCase {
|
|||
* Test checkNotModified method
|
||||
*
|
||||
* @return void
|
||||
**/
|
||||
*/
|
||||
public function testCheckNotModifiedByEtagAndTime() {
|
||||
$_SERVER['HTTP_IF_NONE_MATCH'] = 'W/"something", "other"';
|
||||
$_SERVER['HTTP_IF_MODIFIED_SINCE'] = '2012-01-01 00:00:00';
|
||||
|
@ -889,7 +889,7 @@ class CakeResponseTest extends CakeTestCase {
|
|||
* Test checkNotModified method
|
||||
*
|
||||
* @return void
|
||||
**/
|
||||
*/
|
||||
public function testCheckNotModifiedByEtagAndTimeMismatch() {
|
||||
$_SERVER['HTTP_IF_NONE_MATCH'] = 'W/"something", "other"';
|
||||
$_SERVER['HTTP_IF_MODIFIED_SINCE'] = '2012-01-01 00:00:00';
|
||||
|
@ -904,7 +904,7 @@ class CakeResponseTest extends CakeTestCase {
|
|||
* Test checkNotModified method
|
||||
*
|
||||
* @return void
|
||||
**/
|
||||
*/
|
||||
public function testCheckNotModifiedByEtagMismatch() {
|
||||
$_SERVER['HTTP_IF_NONE_MATCH'] = 'W/"something-else", "other"';
|
||||
$_SERVER['HTTP_IF_MODIFIED_SINCE'] = '2012-01-01 00:00:00';
|
||||
|
@ -919,7 +919,7 @@ class CakeResponseTest extends CakeTestCase {
|
|||
* Test checkNotModified method
|
||||
*
|
||||
* @return void
|
||||
**/
|
||||
*/
|
||||
public function testCheckNotModifiedByTime() {
|
||||
$_SERVER['HTTP_IF_MODIFIED_SINCE'] = '2012-01-01 00:00:00';
|
||||
$response = $this->getMock('CakeResponse', array('notModified'));
|
||||
|
@ -932,7 +932,7 @@ class CakeResponseTest extends CakeTestCase {
|
|||
* Test checkNotModified method
|
||||
*
|
||||
* @return void
|
||||
**/
|
||||
*/
|
||||
public function testCheckNotModifiedNoHints() {
|
||||
$_SERVER['HTTP_IF_NONE_MATCH'] = 'W/"something", "other"';
|
||||
$_SERVER['HTTP_IF_MODIFIED_SINCE'] = '2012-01-01 00:00:00';
|
||||
|
|
|
@ -24,7 +24,7 @@ App::uses('Router', 'Routing');
|
|||
* Test case for CakeRoute
|
||||
*
|
||||
* @package Cake.Test.Case.Routing.Route
|
||||
**/
|
||||
*/
|
||||
class CakeRouteTest extends CakeTestCase {
|
||||
|
||||
/**
|
||||
|
@ -41,7 +41,7 @@ class CakeRouteTest extends CakeTestCase {
|
|||
* Test the construction of a CakeRoute
|
||||
*
|
||||
* @return void
|
||||
**/
|
||||
*/
|
||||
public function testConstruction() {
|
||||
$route = new CakeRoute('/:controller/:action/:id', array(), array('id' => '[0-9]+'));
|
||||
|
||||
|
@ -55,7 +55,7 @@ class CakeRouteTest extends CakeTestCase {
|
|||
* test Route compiling.
|
||||
*
|
||||
* @return void
|
||||
**/
|
||||
*/
|
||||
public function testBasicRouteCompiling() {
|
||||
$route = new CakeRoute('/', array('controller' => 'pages', 'action' => 'display', 'home'));
|
||||
$result = $route->compile();
|
||||
|
@ -107,7 +107,7 @@ class CakeRouteTest extends CakeTestCase {
|
|||
* test compiling routes with keys that have patterns
|
||||
*
|
||||
* @return void
|
||||
**/
|
||||
*/
|
||||
public function testRouteCompilingWithParamPatterns() {
|
||||
$route = new CakeRoute(
|
||||
'/:controller/:action/:id',
|
||||
|
@ -235,7 +235,7 @@ class CakeRouteTest extends CakeTestCase {
|
|||
* test that routes match their pattern.
|
||||
*
|
||||
* @return void
|
||||
**/
|
||||
*/
|
||||
public function testMatchBasic() {
|
||||
$route = new CakeRoute('/:controller/:action/:id', array('plugin' => null));
|
||||
$result = $route->match(array('controller' => 'posts', 'action' => 'view', 'plugin' => null));
|
||||
|
|
|
@ -535,7 +535,7 @@ class RouterTest extends CakeTestCase {
|
|||
* Test generation of routes with query string parameters.
|
||||
*
|
||||
* @return void
|
||||
**/
|
||||
*/
|
||||
public function testUrlGenerationWithQueryStrings() {
|
||||
$result = Router::url(array('controller' => 'posts', 'action' => 'index', '0', '?' => 'var=test&var2=test2'));
|
||||
$expected = '/posts/index/0?var=test&var2=test2';
|
||||
|
@ -559,7 +559,7 @@ class RouterTest extends CakeTestCase {
|
|||
* test that regex validation of keyed route params is working.
|
||||
*
|
||||
* @return void
|
||||
**/
|
||||
*/
|
||||
public function testUrlGenerationWithRegexQualifiedParams() {
|
||||
Router::connect(
|
||||
':language/galleries',
|
||||
|
|
|
@ -1055,7 +1055,7 @@ class CakeTimeTest extends CakeTestCase {
|
|||
* from one timezone to the other correctly
|
||||
*
|
||||
* @return void
|
||||
**/
|
||||
*/
|
||||
public function testCorrectTimezoneConversion() {
|
||||
date_default_timezone_set('UTC');
|
||||
$date = '2012-01-01 10:00:00';
|
||||
|
|
|
@ -2171,7 +2171,7 @@ class ValidationTest extends CakeTestCase {
|
|||
*
|
||||
* @expectedException PHPUnit_Framework_Error
|
||||
* @return void
|
||||
**/
|
||||
*/
|
||||
public function testPassThroughClassFailure() {
|
||||
Validation::postal('text', null, 'AUTOFAIL');
|
||||
}
|
||||
|
|
|
@ -517,7 +517,7 @@ class CacheHelperTest extends CakeTestCase {
|
|||
* apps url would look something like http://localhost/cache/cacheTest/cache_name
|
||||
*
|
||||
* @return void
|
||||
**/
|
||||
*/
|
||||
public function testCacheBaseNameControllerName() {
|
||||
$this->Controller->cache_parsing();
|
||||
$this->Controller->cacheAction = array(
|
||||
|
|
|
@ -3314,7 +3314,7 @@ class FormHelperTest extends CakeTestCase {
|
|||
);
|
||||
$this->assertTags($result, $expected);
|
||||
|
||||
/** Testing error messages list options **/
|
||||
// Testing error messages list options
|
||||
$Contact->validationErrors['field'] = array('notEmpty', 'email');
|
||||
|
||||
$result = $this->Form->error('Contact.field', null, array('listOptions' => 'ol'));
|
||||
|
|
|
@ -161,7 +161,7 @@ class JsHelper extends AppHelper {
|
|||
* @param boolean $quoteString If false, leaves string values unquoted
|
||||
* @return string a JavaScript-safe/JSON representation of $val
|
||||
* @link http://book.cakephp.org/2.0/en/core-libraries/helpers/js.html#JsHelper::value
|
||||
**/
|
||||
*/
|
||||
public function value($val = array(), $quoteString = null, $key = 'value') {
|
||||
if ($quoteString === null) {
|
||||
$quoteString = true;
|
||||
|
|
Loading…
Reference in a new issue