search

Home  >  Q&A  >  body text

phpunit related learning suggestions

I just briefly taught myself phpunit and simply tested the code I wrote. I feel that I already understand it. I would like to ask for more in-depth information and methods related to phpunit.
For example: interface development, what comes is json, the original framework code processes json and puts it into certain variables. phpunit tests classes. I seem to be unable to simulate the correct parameter transfer.

Another example: the product details interface, which returns a lot of data, cannot use $this->assertEquals($expected,$actual); to verify whether the interface is OK.

Looking for some learning directions, information, etc.

ringa_leeringa_lee2782 days ago615

reply all(1)I'll reply

  • 怪我咯

    怪我咯2017-05-16 13:12:52

    phpunit can also simulate interface requests. It is enough to read the documentation. You can also refer to the test code of some frameworks, such as the test code in laravel, which integrates some codes for accessing interface requests. You can refer to

    reply
    0
  • Cancelreply