owncloud/chat — pull request #44 by LEDfan (2014-04-11 05:34:13+00:00)
Title: [WIP] Add unit tests

I'm trying to add unit tests to this app.

@Raydiation can you help me with the following problem?
I'd like to unit test https://github.com/owncloud/chat/blob/add_unit_tests/lib/och/commands/startconv.php using https://github.com/owncloud/chat/blob/add_unit_tests/tests/lib/lib/och/commands/StartConvTest.php .
Because there isn't a database when unit test I have to mock the *Mapper classes. But because I create an instance of them in the StartConv manually I can't change this via Dependency Injection. Should I include the Mapper classes in the DIContainer? This would be ideally for the unit testing

Thanks