Permalink
Browse files

Code standards formatting

  • Loading branch information...
1 parent f1b566b commit 51f9837db4a1a23676c9d26d6aa835998ff44da4 @shama shama committed Dec 16, 2011
Showing with 220 additions and 213 deletions.
  1. +2 −2 lib/Cake/Console/Command/ApiShell.php
  2. +3 −3 lib/Cake/Console/Command/Task/ProjectTask.php
  3. +4 −4 lib/Cake/Controller/Component/AclComponent.php
  4. +3 −3 lib/Cake/Controller/Controller.php
  5. +1 −1 lib/Cake/Core/App.php
  6. +3 −3 lib/Cake/I18n/I18n.php
  7. +1 −1 lib/Cake/I18n/Multibyte.php
  8. +2 −2 lib/Cake/Model/Behavior/ContainableBehavior.php
  9. +19 −19 lib/Cake/Model/Behavior/TranslateBehavior.php
  10. +4 −4 lib/Cake/Model/Behavior/TreeBehavior.php
  11. +3 −3 lib/Cake/Model/Datasource/Database/Postgres.php
  12. +1 −1 lib/Cake/Model/Datasource/Database/Sqlite.php
  13. +1 −1 lib/Cake/Model/Datasource/Database/Sqlserver.php
  14. +1 −1 lib/Cake/Model/Datasource/DboSource.php
  15. +1 −1 lib/Cake/Model/Model.php
  16. +1 −1 lib/Cake/Network/CakeResponse.php
  17. +2 −2 lib/Cake/Network/CakeSocket.php
  18. +5 −5 lib/Cake/Test/Case/Cache/Engine/MemcacheEngineTest.php
  19. +3 −3 lib/Cake/Test/Case/Console/Command/AclShellTest.php
  20. +4 −4 lib/Cake/Test/Case/Console/Command/Task/ExtractTaskTest.php
  21. +2 −2 lib/Cake/Test/Case/Console/Command/Task/ModelTaskTest.php
  22. +1 −1 lib/Cake/Test/Case/Console/Command/Task/ProjectTaskTest.php
  23. +2 −2 lib/Cake/Test/Case/Console/ShellTest.php
  24. +1 −1 lib/Cake/Test/Case/Controller/Component/AuthComponentTest.php
  25. +6 −6 lib/Cake/Test/Case/Controller/ScaffoldTest.php
  26. +5 −5 lib/Cake/Test/Case/Core/AppTest.php
  27. +2 −2 lib/Cake/Test/Case/Model/Behavior/ContainableBehaviorTest.php
  28. +1 −1 lib/Cake/Test/Case/Model/Behavior/TranslateBehaviorTest.php
  29. +1 −1 lib/Cake/Test/Case/Model/Datasource/Database/MysqlTest.php
  30. +4 −4 lib/Cake/Test/Case/Model/Datasource/Database/PostgresTest.php
  31. +1 −1 lib/Cake/Test/Case/Model/DbAclTest.php
  32. +4 −4 lib/Cake/Test/Case/Model/ModelWriteTest.php
  33. +4 −4 lib/Cake/Test/Case/Model/models.php
  34. +9 −9 lib/Cake/Test/Case/Network/Email/CakeEmailTest.php
  35. +2 −2 lib/Cake/Test/Case/Utility/FileTest.php
  36. +1 −1 lib/Cake/Test/Case/Utility/ValidationTest.php
  37. +1 −1 lib/Cake/Test/Case/View/Helper/CacheHelperTest.php
  38. +2 −2 lib/Cake/Test/Case/View/Helper/HtmlHelperTest.php
  39. +6 −6 lib/Cake/Test/Case/View/Helper/NumberHelperTest.php
  40. +3 −3 lib/Cake/Test/Case/View/Helper/TextHelperTest.php
  41. +2 −2 lib/Cake/Test/Fixture/CounterCachePostFixture.php
  42. +2 −2 lib/Cake/Test/Fixture/CounterCachePostNonstandardPrimaryKeyFixture.php
  43. +30 −26 lib/Cake/Test/Fixture/GroupUpdateAllFixture.php
  44. +33 −30 lib/Cake/Test/Fixture/ProductUpdateAllFixture.php
  45. +1 −1 lib/Cake/Test/test_app/View/Pages/home.ctp
  46. +1 −1 lib/Cake/TestSuite/CakeTestRunner.php
  47. +1 −1 lib/Cake/TestSuite/Reporter/CakeHtmlReporter.php
  48. +1 −1 lib/Cake/TestSuite/Reporter/CakeTextReporter.php
  49. +1 −1 lib/Cake/Utility/File.php
  50. +2 −2 lib/Cake/Utility/Set.php
  51. +1 −1 lib/Cake/Utility/String.php
  52. +1 −1 lib/Cake/Utility/Validation.php
  53. +1 −1 lib/Cake/View/Helper/CacheHelper.php
  54. +1 −1 lib/Cake/View/Helper/HtmlHelper.php
  55. +1 −1 lib/Cake/View/Helper/TextHelper.php
  56. +4 −4 lib/Cake/View/Helper/TimeHelper.php
  57. +4 −4 lib/Cake/View/Scaffolds/view.ctp
  58. +11 −11 lib/Cake/bootstrap.php
@@ -101,7 +101,7 @@ public function main() {
$this->_stop();
}
$method = $parsed[$this->params['method']];
- $this->out($class .'::'.$method['method'] . $method['parameters']);
+ $this->out($class . '::' . $method['method'] . $method['parameters']);
$this->hr();
$this->out($method['comment'], true);
} else {
@@ -127,7 +127,7 @@ public function main() {
if (isset($methods[--$number])) {
$method = $parsed[$methods[$number]];
$this->hr();
- $this->out($class .'::'.$method['method'] . $method['parameters']);
+ $this->out($class . '::' . $method['method'] . $method['parameters']);
$this->hr();
$this->out($method['comment'], true);
}
@@ -269,7 +269,7 @@ public function securitySalt($path) {
$contents = $File->read();
if (preg_match('/([\s]*Configure::write\(\'Security.salt\',[\s\'A-z0-9]*\);)/', $contents, $match)) {
$string = Security::generateAuthKey();
- $result = str_replace($match[0], "\t" . 'Configure::write(\'Security.salt\', \''.$string.'\');', $contents);
+ $result = str_replace($match[0], "\t" . 'Configure::write(\'Security.salt\', \'' . $string . '\');', $contents);
if ($File->write($result)) {
return true;
}
@@ -290,7 +290,7 @@ public function securityCipherSeed($path) {
if (preg_match('/([\s]*Configure::write\(\'Security.cipherSeed\',[\s\'A-z0-9]*\);)/', $contents, $match)) {
App::uses('Security', 'Utility');
$string = substr(bin2hex(Security::generateAuthKey()), 0, 30);
- $result = str_replace($match[0], "\t" . 'Configure::write(\'Security.cipherSeed\', \''.$string.'\');', $contents);
+ $result = str_replace($match[0], "\t" . 'Configure::write(\'Security.cipherSeed\', \'' . $string . '\');', $contents);
if ($File->write($result)) {
return true;
}
@@ -357,7 +357,7 @@ public function cakeAdmin($name) {
$File = new File($path . 'core.php');
$contents = $File->read();
if (preg_match('%(\s*[/]*Configure::write\(\'Routing.prefixes\',[\s\'a-z,\)\(]*\);)%', $contents, $match)) {
- $result = str_replace($match[0], "\n" . 'Configure::write(\'Routing.prefixes\', array(\''.$name.'\'));', $contents);
+ $result = str_replace($match[0], "\n" . 'Configure::write(\'Routing.prefixes\', array(\'' . $name . '\'));', $contents);
if ($File->write($result)) {
Configure::write('Routing.prefixes', array($name));
return true;
@@ -488,11 +488,11 @@ public function getAclLink($aro, $aco) {
}
return array(
- 'aro' => Set::extract($obj, 'Aro.0.'.$this->Aro->alias.'.id'),
- 'aco' => Set::extract($obj, 'Aco.0.'.$this->Aco->alias.'.id'),
+ 'aro' => Set::extract($obj, 'Aro.0.' . $this->Aro->alias . '.id'),
+ 'aco' => Set::extract($obj, 'Aco.0.' . $this->Aco->alias . '.id'),
'link' => $this->Aro->Permission->find('all', array('conditions' => array(
- $this->Aro->Permission->alias . '.aro_id' => Set::extract($obj, 'Aro.0.'.$this->Aro->alias.'.id'),
- $this->Aro->Permission->alias . '.aco_id' => Set::extract($obj, 'Aco.0.'.$this->Aco->alias.'.id')
+ $this->Aro->Permission->alias . '.aro_id' => Set::extract($obj, 'Aro.0.' . $this->Aro->alias . '.id'),
+ $this->Aro->Permission->alias . '.aco_id' => Set::extract($obj, 'Aco.0.' . $this->Aco->alias . '.id')
)))
);
}
@@ -981,7 +981,7 @@ public function postConditions($data = array(), $op = null, $bool = 'AND', $excl
$arrayOp = is_array($op);
foreach ($data as $model => $fields) {
foreach ($fields as $field => $value) {
- $key = $model.'.'.$field;
+ $key = $model . '.' . $field;
$fieldOp = $op;
if ($arrayOp) {
if (array_key_exists($key, $op)) {
@@ -998,9 +998,9 @@ public function postConditions($data = array(), $op = null, $bool = 'AND', $excl
$fieldOp = strtoupper(trim($fieldOp));
if ($fieldOp === 'LIKE') {
$key = $key.' LIKE';
- $value = '%'.$value.'%';
+ $value = '%' . $value . '%';
} elseif ($fieldOp && $fieldOp != '=') {
- $key = $key.' '.$fieldOp;
+ $key = $key.' ' . $fieldOp;
}
$cond[$key] = $value;
}
View
@@ -656,7 +656,7 @@ protected static function _loadClass($name, $plugin, $type, $originalType, $pare
}
App::uses($extends, $extendType);
if ($plugin && in_array($originalType, array('controller', 'model'))) {
- App::uses($plugin . $extends, $plugin . '.' .$type);
+ App::uses($plugin . $extends, $plugin . '.' . $type);
}
}
if ($plugin) {
View
@@ -164,7 +164,7 @@ public static function translate($singular, $plural = null, $domain = null, $cat
}
if ($_this->category == 'LC_TIME') {
- return $_this->_translateTime($singular,$domain);
+ return $_this->_translateTime($singular, $domain);
}
if (!isset($count)) {
@@ -466,7 +466,7 @@ protected function _loadPo($file, $domain) {
} while (!feof($file));
fclose($file);
$merge[""] = $header;
- return $this->_domains[$domain][$this->_lang][$this->category] = array_merge($merge ,$translations);
+ return $this->_domains[$domain][$this->_lang][$this->category] = array_merge($merge, $translations);
}
/**
@@ -486,7 +486,7 @@ protected function _loadLocaleDefinition($file, $domain = null) {
if (empty($line) || $line[0] === $comment) {
continue;
}
- $parts = preg_split("/[[:space:]]+/",$line);
+ $parts = preg_split("/[[:space:]]+/", $line);
if ($parts[0] === 'comment_char') {
$comment = $parts[1];
continue;
@@ -893,7 +893,7 @@ public static function strtoupper($string) {
* @param string $haystack The string being checked.
* @param string $needle The string being found.
* @return integer The number of times the $needle substring occurs in the $haystack string.
- */
+ */
public static function substrCount($haystack, $needle) {
$count = 0;
$haystack = Multibyte::utf8($haystack);
@@ -308,10 +308,10 @@ public function containments($Model, $contain, $containments = array(), $throwEr
$val = preg_split('/\s*,\s*/', substr(substr($key, 1), 0, -1));
} elseif (preg_match('/ASC|DESC$/', $key)) {
$option = 'order';
- $val = $Model->{$name}->alias.'.'.$key;
+ $val = $Model->{$name}->alias . '.' . $key;
} elseif (preg_match('/[ =!]/', $key)) {
$option = 'conditions';
- $val = $Model->{$name}->alias.'.'.$key;
+ $val = $Model->{$name}->alias . '.' . $key;
}
$children[$option] = is_array($val) ? $val : array($val);
$newChildren = null;
@@ -103,8 +103,8 @@ public function beforeFind($model, $query) {
$joinTable->tablePrefix = $tablePrefix;
$joinTable->table = $RuntimeModel->table;
- if (is_string($query['fields']) && 'COUNT(*) AS '.$db->name('count') == $query['fields']) {
- $query['fields'] = 'COUNT(DISTINCT('.$db->name($model->alias . '.' . $model->primaryKey) . ')) ' . $db->alias . 'count';
+ if (is_string($query['fields']) && 'COUNT(*) AS ' . $db->name('count') == $query['fields']) {
+ $query['fields'] = 'COUNT(DISTINCT(' . $db->name($model->alias . '.' . $model->primaryKey) . ')) ' . $db->alias . 'count';
$query['joins'][] = array(
'type' => 'INNER',
'alias' => $RuntimeModel->alias,
@@ -126,7 +126,7 @@ public function beforeFind($model, $query) {
foreach ($fields as $key => $value) {
$field = (is_numeric($key)) ? $value : $key;
- if (in_array($model->alias.'.*', $query['fields']) || in_array($model->alias.'.'.$field, $query['fields']) || in_array($field, $query['fields'])) {
+ if (in_array($model->alias.'.*', $query['fields']) || in_array($model->alias.'.' . $field, $query['fields']) || in_array($field, $query['fields'])) {
$addFields[] = $field;
}
}
@@ -137,7 +137,7 @@ public function beforeFind($model, $query) {
foreach ($addFields as $_f => $field) {
$aliasField = is_numeric($_f) ? $field : $_f;
- foreach (array($aliasField, $model->alias.'.'.$aliasField) as $_field) {
+ foreach (array($aliasField, $model->alias . '.' . $aliasField) as $_field) {
$key = array_search($_field, (array)$query['fields']);
if ($key !== false) {
@@ -147,36 +147,36 @@ public function beforeFind($model, $query) {
if (is_array($locale)) {
foreach ($locale as $_locale) {
- $model->virtualFields['i18n_'.$field.'_'.$_locale] = 'I18n__'.$field.'__'.$_locale.'.content';
+ $model->virtualFields['i18n_' . $field . '_' . $_locale] = 'I18n__' . $field . '__' . $_locale . '.content';
if (!empty($query['fields'])) {
- $query['fields'][] = 'i18n_'.$field.'_'.$_locale;
+ $query['fields'][] = 'i18n_' . $field . '_' . $_locale;
}
$query['joins'][] = array(
'type' => 'LEFT',
- 'alias' => 'I18n__'.$field.'__'.$_locale,
+ 'alias' => 'I18n__' . $field . '__' . $_locale,
'table' => $joinTable,
'conditions' => array(
$model->alias . '.' . $model->primaryKey => $db->identifier("I18n__{$field}__{$_locale}.foreign_key"),
- 'I18n__'.$field.'__'.$_locale.'.model' => $model->name,
- 'I18n__'.$field.'__'.$_locale.'.'.$RuntimeModel->displayField => $aliasField,
- 'I18n__'.$field.'__'.$_locale.'.locale' => $_locale
+ 'I18n__' . $field . '__' . $_locale . '.model' => $model->name,
+ 'I18n__' . $field . '__' . $_locale . '.' . $RuntimeModel->displayField => $aliasField,
+ 'I18n__' . $field . '__' . $_locale . '.locale' => $_locale
)
);
}
} else {
- $model->virtualFields['i18n_'.$field] = 'I18n__'.$field.'.content';
+ $model->virtualFields['i18n_' . $field] = 'I18n__' . $field . '.content';
if (!empty($query['fields'])) {
- $query['fields'][] = 'i18n_'.$field;
+ $query['fields'][] = 'i18n_' . $field;
}
$query['joins'][] = array(
'type' => 'INNER',
- 'alias' => 'I18n__'.$field,
+ 'alias' => 'I18n__' . $field,
'table' => $joinTable,
'conditions' => array(
$model->alias . '.' . $model->primaryKey => $db->identifier("I18n__{$field}.foreign_key"),
- 'I18n__'.$field.'.model' => $model->name,
- 'I18n__'.$field.'.'.$RuntimeModel->displayField => $aliasField,
- 'I18n__'.$field.'.locale' => $locale
+ 'I18n__' . $field . '.model' => $model->name,
+ 'I18n__' . $field . '.' . $RuntimeModel->displayField => $aliasField,
+ 'I18n__' . $field . '.locale' => $locale
)
);
}
@@ -211,11 +211,11 @@ public function afterFind($model, $results, $primary) {
if (is_array($locale)) {
foreach ($locale as $_locale) {
- if (!isset($row[$model->alias][$aliasField]) && !empty($row[$model->alias]['i18n_'.$field.'_'.$_locale])) {
- $row[$model->alias][$aliasField] = $row[$model->alias]['i18n_'.$field.'_'.$_locale];
+ if (!isset($row[$model->alias][$aliasField]) && !empty($row[$model->alias]['i18n_' . $field . '_' . $_locale])) {
+ $row[$model->alias][$aliasField] = $row[$model->alias]['i18n_' . $field . '_' . $_locale];
$row[$model->alias]['locale'] = $_locale;
}
- unset($row[$model->alias]['i18n_'.$field.'_'.$_locale]);
+ unset($row[$model->alias]['i18n_' . $field . '_' . $_locale]);
}
if (!isset($row[$model->alias][$aliasField])) {
@@ -163,8 +163,8 @@ public function beforeSave($Model) {
$this->_addToWhitelist($Model, $parent);
} else {
$values = $Model->find('first', array(
- 'conditions' => array($scope,$Model->escapeField() => $Model->id),
- 'fields' => array($Model->primaryKey, $parent, $left, $right ), 'recursive' => $recursive)
+ 'conditions' => array($scope, $Model->escapeField() => $Model->id),
+ 'fields' => array($Model->primaryKey, $parent, $left, $right), 'recursive' => $recursive)
);
if ($values === false) {
@@ -503,7 +503,7 @@ public function moveUp($Model, $id = null, $number = 1) {
extract($this->settings[$Model->alias]);
list($node) = array_values($Model->find('first', array(
'conditions' => array($scope, $Model->escapeField() => $id),
- 'fields' => array($Model->primaryKey, $left, $right, $parent ), 'recursive' => $recursive
+ 'fields' => array($Model->primaryKey, $left, $right, $parent), 'recursive' => $recursive
)));
if ($node[$parent]) {
list($parentNode) = array_values($Model->find('first', array(
@@ -527,7 +527,7 @@ public function moveUp($Model, $id = null, $number = 1) {
}
$edge = $this->_getMax($Model, $scope, $right, $recursive);
$this->_sync($Model, $edge - $previousNode[$left] +1, '+', 'BETWEEN ' . $previousNode[$left] . ' AND ' . $previousNode[$right]);
- $this->_sync($Model, $node[$left] - $previousNode[$left], '-', 'BETWEEN ' .$node[$left] . ' AND ' . $node[$right]);
+ $this->_sync($Model, $node[$left] - $previousNode[$left], '-', 'BETWEEN ' . $node[$left] . ' AND ' . $node[$right]);
$this->_sync($Model, $edge - $previousNode[$left] - ($node[$right] - $node[$left]), '-', '> ' . $edge);
if (is_int($number)) {
$number--;
@@ -412,7 +412,7 @@ protected function _quoteFunctionField($match) {
$match[1] = $this->name($match[1]);
}
}
- return '(' . $prepend .$match[1] . ')';
+ return '(' . $prepend . $match[1] . ')';
}
/**
@@ -480,13 +480,13 @@ public function alterSchema($compare, $table = null) {
case 'add':
foreach ($column as $field => $col) {
$col['name'] = $field;
- $colList[] = 'ADD COLUMN '.$this->buildColumn($col);
+ $colList[] = 'ADD COLUMN ' . $this->buildColumn($col);
}
break;
case 'drop':
foreach ($column as $field => $col) {
$col['name'] = $field;
- $colList[] = 'DROP COLUMN '.$this->name($field);
+ $colList[] = 'DROP COLUMN ' . $this->name($field);
}
break;
case 'change':
@@ -238,7 +238,7 @@ public function column($real) {
if (is_array($real)) {
$col = $real['name'];
if (isset($real['limit'])) {
- $col .= '('.$real['limit'].')';
+ $col .= '(' . $real['limit'] . ')';
}
return $col;
}
@@ -302,7 +302,7 @@ public function fields($model, $alias = null, $fields = array(), $quote = true)
$fieldAlias = $this->name($alias . '__' . $fields[$i]);
} else {
$build = explode('.', $fields[$i]);
- $this->_fieldMappings[$build[0] . '__' .$build[1]] = $fields[$i];
+ $this->_fieldMappings[$build[0] . '__' . $build[1]] = $fields[$i];
$fieldName = $this->name($build[0] . '.' . $build[1]);
$fieldAlias = $this->name(preg_replace("/^\[(.+)\]$/", "$1", $build[0]) . '__' . $build[1]);
}
@@ -787,7 +787,7 @@ public function name($data) {
}
return $data;
}
- $cacheKey = crc32($this->startQuote.$data.$this->endQuote);
+ $cacheKey = crc32($this->startQuote . $data . $this->endQuote);
if ($return = $this->cacheMethod(__FUNCTION__, $cacheKey)) {
return $return;
}
View
@@ -2417,7 +2417,7 @@ public function hasAny($conditions = null) {
* Queries the datasource and returns a result set array.
*
* Also used to perform notation finds, where the first argument is type of find operation to perform
- * (all / first / count / neighbors / list / threaded ),
+ * (all / first / count / neighbors / list / threaded),
* second parameter options for finding ( indexed array, including: 'conditions', 'limit',
* 'recursive', 'page', 'fields', 'offset', 'order')
*
@@ -372,7 +372,7 @@ protected function _setContentLength() {
$this->_headers['Content-Length'] = $offset + strlen($this->_body);
}
}
- }
+ }
/**
* Sends a header to the client.
@@ -106,9 +106,9 @@ public function connect() {
}
if ($this->config['persistent'] == true) {
- $this->connection = @pfsockopen($scheme.$this->config['host'], $this->config['port'], $errNum, $errStr, $this->config['timeout']);
+ $this->connection = @pfsockopen($scheme . $this->config['host'], $this->config['port'], $errNum, $errStr, $this->config['timeout']);
} else {
- $this->connection = @fsockopen($scheme.$this->config['host'], $this->config['port'], $errNum, $errStr, $this->config['timeout']);
+ $this->connection = @fsockopen($scheme . $this->config['host'], $this->config['port'], $errNum, $errStr, $this->config['timeout']);
}
if (!empty($errNum) || !empty($errStr)) {
@@ -169,11 +169,11 @@ public function testParseServerStringNonLatin() {
*
* @return void
*/
- function testParseServerStringUnix() {
- $Memcache =& new TestMemcacheEngine();
- $result = $Memcache->parseServerString('unix:///path/to/memcached.sock');
- $this->assertEquals($result, array('unix:///path/to/memcached.sock', 0));
- }
+ function testParseServerStringUnix() {
+ $Memcache =& new TestMemcacheEngine();
+ $result = $Memcache->parseServerString('unix:///path/to/memcached.sock');
+ $this->assertEquals($result, array('unix:///path/to/memcached.sock', 0));
+ }
/**
* testReadAndWriteCache method
@@ -289,9 +289,9 @@ public function testGetPath() {
$first = $node[0]['Aro']['id'];
$second = $node[1]['Aro']['id'];
$last = $node[2]['Aro']['id'];
- $this->Task->expects($this->at(2))->method('out')->with('['.$last.'] ROOT');
- $this->Task->expects($this->at(3))->method('out')->with(' ['.$second.'] admins');
- $this->Task->expects($this->at(4))->method('out')->with(' ['.$first.'] Elrond');
+ $this->Task->expects($this->at(2))->method('out')->with('[' . $last . '] ROOT');
+ $this->Task->expects($this->at(3))->method('out')->with(' [' . $second . '] admins');
+ $this->Task->expects($this->at(4))->method('out')->with(' [' . $first . '] Elrond');
$this->Task->getPath();
}
@@ -329,10 +329,10 @@ public function testExtractModelValidationWithDomainInModel() {
$this->Task->execute();
$result = file_get_contents($this->path . DS . 'test_plugin.pot');
- $pattern = preg_quote('#Plugin' . DS. 'TestPlugin' . DS. 'Model' . DS. 'TestPluginPost.php:validation for field title#', '\\');
+ $pattern = preg_quote('#Plugin' . DS . 'TestPlugin' . DS . 'Model' . DS . 'TestPluginPost.php:validation for field title#', '\\');
$this->assertRegExp($pattern, $result);
- $pattern = preg_quote('#Plugin' . DS. 'TestPlugin' . DS. 'Model' . DS. 'TestPluginPost.php:validation for field body#', '\\');
+ $pattern = preg_quote('#Plugin' . DS . 'TestPlugin' . DS . 'Model' . DS . 'TestPluginPost.php:validation for field body#', '\\');
$this->assertRegExp($pattern, $result);
$pattern = '#msgid "Post title is required"#';
@@ -369,10 +369,10 @@ public function testExtractModelValidationInPlugin() {
$this->Task->execute();
$result = file_get_contents($this->path . DS . 'test_plugin.pot');
- $pattern = preg_quote('#Model' . DS. 'TestPluginPost.php:validation for field title#', '\\');
+ $pattern = preg_quote('#Model' . DS . 'TestPluginPost.php:validation for field title#', '\\');
$this->assertRegExp($pattern, $result);
- $pattern = preg_quote('#Model' . DS. 'TestPluginPost.php:validation for field body#', '\\');
+ $pattern = preg_quote('#Model' . DS . 'TestPluginPost.php:validation for field body#', '\\');
$this->assertRegExp($pattern, $result);
$pattern = '#msgid "Post title is required"#';
Oops, something went wrong.

0 comments on commit 51f9837

Please sign in to comment.