0
Hello. I need to test the magic methods in PHP UNIT. I’m using the Slim Framework
That it’s them
__set()
__get()
__construct()
__invoke()
handle()
0
Hello. I need to test the magic methods in PHP UNIT. I’m using the Slim Framework
That it’s them
__set()
__get()
__construct()
__invoke()
handle()
Browser other questions tagged php unit-testing slim phpunit slimframework
You are not signed in. Login or sign up in order to post.
You know what everyone does?
– Woss
https://stackoverflow.com/questions/13148669/unit-testing-magic-methods
– Wallace Maxters
It is not enough to make the use as if it were to be used in a real application, since unit testing usually expects the execution behavior as it would be done in the application, but with all possibilities, then the test for __set would be to do something like
$obj->foo = true
? Isn’t that right? Or did I make a mistake?– Guilherme Nascimento
I know what each one does, now the unitary tests in phpunit are difficult.
– Alok Ninja