-
-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failing test for issue #657 (calling find before flush) #665
base: 2.x
Are you sure you want to change the base?
Conversation
Note that this does not currently address the same problem which this case was designed to reproduce (in routing auto. In that issue one of the fields caused an undefined index error. I tried to fix this in a few ways yesterday, but I think there may be more than one issue that needs to be overcome. |
|
||
$article->topic = 'Bonjour le monde!'; | ||
$this->dm->bindTranslation($article, 'fr'); | ||
$articleInstance = $this->dm->findTranslation(get_class($article), '/functional/article-1', 'en'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this will be the same object as $article. not sure if we should assign in this case. if we have no test about that, maybe assertSame($article, $articleInstance).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I was trying to illustrate the problrem, but yeah, pointlesss.
On 9 October 2015 16:45:53 BST, David Buchmann [email protected] wrote:
- /**
\* It should be able to find a bound translation before flush.
*/
- public function testRetainTranslation()
- {
$article = new Article;
$article->id = '/functional/article-1';
$article->text = 'Foo';
$this->dm->persist($article);
$article->topic = 'Hello everybody!';
$this->dm->bindTranslation($article, 'en');
$article->topic = 'Bonjour le monde!';
$this->dm->bindTranslation($article, 'fr');
$this->dm->findTranslation(get_class($article),$articleInstance =
'/functional/article-1', 'en');this will be the same object as $article. not sure if we should assign
in this case. if we have no test about that, maybe assertSame($article,
$articleInstance).
Reply to this email directly or view it on GitHub:
https://github.com/doctrine/phpcr-odm/pull/665/files#r41645115
Sent from my Android device with K-9 Mail. Please excuse my brevity.
i agree that this should work like the test describes it |
Failing test for issue #657