Skip to content
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

Undelete broken? #121

Open
floegel opened this issue Dec 19, 2013 · 3 comments
Open

Undelete broken? #121

floegel opened this issue Dec 19, 2013 · 3 comments

Comments

@floegel
Copy link

floegel commented Dec 19, 2013

Hi, it seems like the undelete functionality is broken.

I tested the following code:

$topic = new midgard_topic();
$topic->name = uniqid("topic" . microtime());
$topic->create();
$stat = $topic->delete();
var_dump("delete", $stat, $topic->metadata->deleted);
// this should work
$stat = midgard_topic::undelete($topic->guid);
var_dump("undelete", $stat, $topic->metadata->deleted);
var_dump(midgard_connection::get_instance()->get_error_string());

I would expect the undelete to return true and the metadata_deleted property to be false afterwards. Unfortunately, i get this output instead:

string 'delete' (length=6)
boolean true
boolean true
string 'undelete' (length=8)
boolean false
boolean true
string 'Undefined errorProperty 'guid' doesn't seem to be registered for 'MidgardRepligard' class' (length=89)

Kind regards

@piotras
Copy link
Member

piotras commented Dec 19, 2013

Might be. A test for this case would be very helpful. https://github.com/midgardproject/midgard-core/tree/master/tests/GIR

@floegel
Copy link
Author

floegel commented Dec 19, 2013

Well, would it be helpful if i made a phpt test out of my code or do you think this is an issue with midgard-core?
Furthermore, would you be willing to fix the issue if i came up with a respective unittest for midgard-core?

@piotras
Copy link
Member

piotras commented Dec 19, 2013

This is midgard-core issue I suspect. And yeah, having core test would help a lot with a fix.

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

No branches or pull requests

2 participants