php有没有任何替代品?

I have been working with Ruby on Rails for a while. It has a wonderful lib called factory_girl which helps a lot building a test data. Recently I have been searching for similar alternatives in PHP. The only library I came into was Phactory.

I ask to share your experience on PHP testing data frameworks and recommend any handy libraries.

There is a new fixture library called "Alice". It is not dependent on a framework, however you'd have to use either Doctrine ORM or implement the Doctrine\Common\Persistence\ObjectManager interface. If you implement the ObjectManager interface yourself you don't need a database, you could just store the fixtures in memory.

You can read the fixtures from YAML or PHP files and there are provisions to create fixture ranges (User1, User2 ..User10), variable replacement, reference fixtures and generate data with the Faker library.