mnapoli / BlackBox

[Experimental] Versatile storage library
http://mnapoli.fr/BlackBox/
14 stars 0 forks source link

Storage specifications #21

Open mnapoli opened 9 years ago

mnapoli commented 9 years ago

As I adapted the implementation with the storage interface, I also tried to add more tests and specify a few edge cases.

This is just started, nothing very extensive for now. The way I did it is I wrote a BaseStorageTest class that PHPUnit tests can extend. This guarantees running the same tests for all storages.

Here is the result running phpunit --testdox:

 [x] it should store data as map
 [x] add should store data with autogenerated id
 [x] get non existent key should return null
 [x] set null should store null
 [x] remove should delete the entry
 [x] it should be traversable

So, questions:

... more to come, suggestions welcome.