Skip to content

Conversation

@photodude
Copy link
Contributor

@photodude photodude commented Jan 15, 2017

Pull Request for Issue - backports joomla/joomla-cms#13284

  • Update (with join) query (PostgresqlQuery) on each call method __toString() generates different string.

Summary of Changes

  • Fix PostgreSQL update query to return the same string each time of call method __toString()

Testing Instructions

Test by travis.
Code review.

Documentation Changes Required

none

@photodude
Copy link
Contributor Author

Ping @csthomas

/**
* The instance of the object to test.
*
* @var PostgresqlQuery
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

__DEPLOY_VERSION__

*
* @var PostgresqlQuery
* @since _VERSION_NAME_
*/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unless there is an actual need, let's not introduce an underscore prefixed variable.

Copy link
Contributor Author

@photodude photodude Jan 15, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll remove the underscore but leave the variable, I just followed what the CMS did for the test changes with test__toStringUpdate()

* @param boolean $new True to get a new query, false to get the last query.
*
* @return PostgresqlQuery
*
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

__DEPLOY_VERSION__

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed all of these to the correct string

$query .= (string) $this->where;
}

$this->from = $tmpFrom;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extra indenting here and the next line.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

* @return void
*
* @see PHPUnit_Framework_TestCase::tearDown()
* @since _VERSION_NAME_
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

__DEPLOY_VERSION__

@mbabker mbabker merged commit 13a04c9 into joomla-framework:master Jan 15, 2017
@photodude photodude deleted the patch-7 branch January 15, 2017 04:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants