Hey Ralf,

I don't think its misleading. For unit test purposes and i emphasize the
"unit" it serves the purpose of the mocked object, the TableGateway in this
case.
It really all depends on what you are trying to accomplish. If you just
want to unit test your single method then you should be fine with your
solution above.
Integration and functional test is another layer on top of unit test to
make sure everything work as intended.


On Thu, Oct 24, 2013 at 10:30 AM, Ralf Eggert <[email protected]> wrote:

> Hi Franz,
>
> franz de leon schrieb am 24.10.2013 15:35:
> > sounds like you are looking more of an integration test and data
> fixtures.
>
> Ok, need to look into that. By the way, I got my inspiration from this
> little tutorial which has a quite different setup. In the tutorial the
> AlbumTable uses a TableGateway instance while my CustomerTable extends
> the TableGateway.
>
>
> http://zf2.readthedocs.org/en/latest/tutorials/unittesting.html#testing-model-tables
>
> So, isn't the tutorial a bit misleading in how to write proper tests?
>
> Thanks and best regards,
>
> Ralf
>
> --
> List: [email protected]
> Info: http://framework.zend.com/archives
> Unsubscribe: [email protected]
>
>
>

Reply via email to