coen-hyde / Shanty-Mongo

Shanty Mongo is a mongodb library for the Zend Framework. Its intention is to make working with mongodb documents as natural and as simple as possible. In particular allowing embedded documents to also have custom document classes.
Other
200 stars 52 forks source link

Export without required check #106

Closed tholder closed 11 years ago

tholder commented 11 years ago

@jwpage @coen-hyde this adds a parameter to export to prevent it firing the require fields validator.

For the purpose of getting data out, you don't always want to fire validators.

I'm having trouble getting the tests to run though, this is troubling! I get:

PHPUnit 3.7.10 by Sebastian Bergmann.

Configuration read from /Users/tholder/Sites/Shanty-Mongo/phpunit.xml.dist

PHP Fatal error: Call to a member function selectDb() on a non-object in /Users/tholder/Sites/Shanty-Mongo/tests/Shanty/TestSetup.php on line 180

I've had a bit of a dig around, but I haven't had the tests running since the move to composer. Any they running for anyone else?

tholder commented 11 years ago

It's not just me, Travis borked. Think we need to get to the bottom of this, can't have the tests failing. Will try to investigate.

tholder commented 11 years ago

Ignore me, something about this branch has broken things. Master does seem to run tests.

tholder commented 11 years ago

I'm stumped as to why this makes the tests explode. Will try and re-implement differently.

jwpage commented 11 years ago

It was because a couple of the test documents override the export() function, so not fixing the method signature on that was causing problems.

tholder commented 11 years ago

hah, thanks @jwpage, I just found that and it rejected my push lol

tholder commented 11 years ago

You happy to merge this?

coen-hyde commented 11 years ago

looks good