mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 19:38:26 +00:00
Removing some asignations by reference
This commit is contained in:
parent
642bfe3576
commit
183e9c92df
1 changed files with 12 additions and 12 deletions
|
@ -2048,7 +2048,7 @@ class DboSourceTest extends CakeTestCase {
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function testGenerateAssociationQueryHasManyAndAggregateFunction() {
|
function testGenerateAssociationQueryHasManyAndAggregateFunction() {
|
||||||
$this->Model =& new TestModel5();
|
$this->Model = new TestModel5();
|
||||||
$this->Model->schema();
|
$this->Model->schema();
|
||||||
$this->_buildRelatedModels($this->Model);
|
$this->_buildRelatedModels($this->Model);
|
||||||
|
|
||||||
|
@ -4319,7 +4319,7 @@ class DboSourceTest extends CakeTestCase {
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function testVirtualFieldsInConditions() {
|
function testVirtualFieldsInConditions() {
|
||||||
$Article =& ClassRegistry::init('Article');
|
$Article = ClassRegistry::init('Article');
|
||||||
$Article->virtualFields = array(
|
$Article->virtualFields = array(
|
||||||
'this_moment' => 'NOW()',
|
'this_moment' => 'NOW()',
|
||||||
'two' => '1 + 1',
|
'two' => '1 + 1',
|
||||||
|
@ -4353,7 +4353,7 @@ class DboSourceTest extends CakeTestCase {
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function testConditionsWithComplexVirtualFields() {
|
function testConditionsWithComplexVirtualFields() {
|
||||||
$Article =& ClassRegistry::init('Article');
|
$Article = ClassRegistry::init('Article');
|
||||||
$Article->virtualFields = array(
|
$Article->virtualFields = array(
|
||||||
'distance' => 'ACOS(SIN(20 * PI() / 180)
|
'distance' => 'ACOS(SIN(20 * PI() / 180)
|
||||||
* SIN(Article.latitude * PI() / 180)
|
* SIN(Article.latitude * PI() / 180)
|
||||||
|
@ -4376,7 +4376,7 @@ class DboSourceTest extends CakeTestCase {
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function testVirtualFieldsInOrder() {
|
function testVirtualFieldsInOrder() {
|
||||||
$Article =& ClassRegistry::init('Article');
|
$Article = ClassRegistry::init('Article');
|
||||||
$Article->virtualFields = array(
|
$Article->virtualFields = array(
|
||||||
'this_moment' => 'NOW()',
|
'this_moment' => 'NOW()',
|
||||||
'two' => '1 + 1',
|
'two' => '1 + 1',
|
||||||
|
@ -4398,7 +4398,7 @@ class DboSourceTest extends CakeTestCase {
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function testVirtualFieldsInCalculate() {
|
function testVirtualFieldsInCalculate() {
|
||||||
$Article =& ClassRegistry::init('Article');
|
$Article = ClassRegistry::init('Article');
|
||||||
$Article->virtualFields = array(
|
$Article->virtualFields = array(
|
||||||
'this_moment' => 'NOW()',
|
'this_moment' => 'NOW()',
|
||||||
'two' => '1 + 1',
|
'two' => '1 + 1',
|
||||||
|
@ -4447,9 +4447,9 @@ class DboSourceTest extends CakeTestCase {
|
||||||
function testVirtualFieldsComplexRead() {
|
function testVirtualFieldsComplexRead() {
|
||||||
$this->loadFixtures('DataTest', 'Article', 'Comment');
|
$this->loadFixtures('DataTest', 'Article', 'Comment');
|
||||||
|
|
||||||
$Article =& ClassRegistry::init('Article');
|
$Article = ClassRegistry::init('Article');
|
||||||
$commentTable = $this->db->fullTableName('comments');
|
$commentTable = $this->db->fullTableName('comments');
|
||||||
$Article =& ClassRegistry::init('Article');
|
$Article = ClassRegistry::init('Article');
|
||||||
$Article->virtualFields = array(
|
$Article->virtualFields = array(
|
||||||
'comment_count' => 'SELECT COUNT(*) FROM ' . $commentTable .
|
'comment_count' => 'SELECT COUNT(*) FROM ' . $commentTable .
|
||||||
' AS Comment WHERE Article.id = Comment.article_id'
|
' AS Comment WHERE Article.id = Comment.article_id'
|
||||||
|
@ -4458,7 +4458,7 @@ class DboSourceTest extends CakeTestCase {
|
||||||
$this->assertTrue(count($result) > 0);
|
$this->assertTrue(count($result) > 0);
|
||||||
$this->assertTrue($result[0]['Article']['comment_count'] > 0);
|
$this->assertTrue($result[0]['Article']['comment_count'] > 0);
|
||||||
|
|
||||||
$DataTest =& ClassRegistry::init('DataTest');
|
$DataTest = ClassRegistry::init('DataTest');
|
||||||
$DataTest->virtualFields = array(
|
$DataTest->virtualFields = array(
|
||||||
'complicated' => 'ACOS(SIN(20 * PI() / 180)
|
'complicated' => 'ACOS(SIN(20 * PI() / 180)
|
||||||
* SIN(DataTest.float * PI() / 180)
|
* SIN(DataTest.float * PI() / 180)
|
||||||
|
@ -4478,7 +4478,7 @@ class DboSourceTest extends CakeTestCase {
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function testFieldsWithComplexVirtualFields() {
|
function testFieldsWithComplexVirtualFields() {
|
||||||
$Article =& new Article();
|
$Article = new Article();
|
||||||
$Article->virtualFields = array(
|
$Article->virtualFields = array(
|
||||||
'distance' => 'ACOS(SIN(20 * PI() / 180)
|
'distance' => 'ACOS(SIN(20 * PI() / 180)
|
||||||
* SIN(Article.latitude * PI() / 180)
|
* SIN(Article.latitude * PI() / 180)
|
||||||
|
@ -4505,7 +4505,7 @@ class DboSourceTest extends CakeTestCase {
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function testReadVirtualFieldsWithNewLines() {
|
function testReadVirtualFieldsWithNewLines() {
|
||||||
$Article =& new Article();
|
$Article = new Article();
|
||||||
$Article->recursive = 1;
|
$Article->recursive = 1;
|
||||||
$Article->virtualFields = array(
|
$Article->virtualFields = array(
|
||||||
'test' => '
|
'test' => '
|
||||||
|
@ -4523,7 +4523,7 @@ class DboSourceTest extends CakeTestCase {
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function testVirtualFieldsInGroup() {
|
function testVirtualFieldsInGroup() {
|
||||||
$Article =& ClassRegistry::init('Article');
|
$Article = ClassRegistry::init('Article');
|
||||||
$Article->virtualFields = array(
|
$Article->virtualFields = array(
|
||||||
'this_year' => 'YEAR(Article.created)'
|
'this_year' => 'YEAR(Article.created)'
|
||||||
);
|
);
|
||||||
|
@ -4540,7 +4540,7 @@ class DboSourceTest extends CakeTestCase {
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function testFullTablePermutations() {
|
function testFullTablePermutations() {
|
||||||
$Article =& ClassRegistry::init('Article');
|
$Article = ClassRegistry::init('Article');
|
||||||
$result = $this->testDb->fullTableName($Article, false);
|
$result = $this->testDb->fullTableName($Article, false);
|
||||||
$this->assertEqual($result, 'articles');
|
$this->assertEqual($result, 'articles');
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue