Skip to content

fixing the multiple roots problem with updating left, right #42

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

Merged
merged 1 commit into from
Jan 2, 2015

Conversation

Mihai-P
Copy link

@Mihai-P Mihai-P commented Jan 1, 2015

shiftLeftRightAttribute takes into consideration the root. However the root is not set until after the the other nodes are updated. So this part of shiftLeftRightAttribute

if ($this->treeAttribute !== false) {
$condition = [
'and',
$condition,
[$this->treeAttribute => $this->owner->getAttribute($this->treeAttribute)]
];
}

Will create a condition with where $this->owner->getAttribute($this->treeAttribute) is empty. As a result no records are changed.

creocoder added a commit that referenced this pull request Jan 2, 2015
Fixing the multiple roots problem with updating left, right on inserting new node
@creocoder creocoder merged commit 66f6c38 into creocoder:master Jan 2, 2015
@creocoder
Copy link
Owner

@Mihai-P Good catch, thanks!

@Mihai-P
Copy link
Author

Mihai-P commented Jan 2, 2015

Can you give me some tips on how to run the tests? I would like to add some tests cases.

@creocoder
Copy link
Owner

@Mihai-P Download phpunit.phar and put it near phpunit.xml.dist and than run

$ php phpunit.phar

Btw currently there is only base for tests. Help with tests would be very helpful. If you want contribute contact me please via Skype ID: creocoder and i'll explain unit tests next plan.

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