Specifying Query in Unit Test
When writing unit tests, should I specify the query that will be performed for interacting with the database?
Unit-testing functions without business logic (only checks) [duplicate]
This question already has answers here: Is it useful to unit test methods where the only logic is guards? (5 answers) Closed 11 years ago. My team is trying to find out the best way to test one of our components; the main scope is to check if the user/actor has the right to complete […]
Unit Test code generation
We have a project that was written over a period of 2 years, but has a poorly designed architecture and not unit tests.
Time consuming Unit test for support for 100,000 records: Am I doing it right?
I am working on adding test coverage for an application that previously didn’t have any. One additional requirement that emerged is that one of the background processes should be able to process 100,000 rows at a time.
is there a way for a PHPUnit extension to get information from within the test?
I’m trying to implement a PHPUnit extension and I need data that the test’s setUp() put in a static property on a class. (Specifically, Drupal’s Database::getAllConnectionInfo()
.)
is there a way for a PHPUnit extension to get information from within the test?
I’m trying to implement a PHPUnit extension and I need data that the test’s setUp() put in a static property on a class. (Specifically, Drupal’s Database::getAllConnectionInfo()
.)
phpunit inject mocked object into another mocked object
I want to test the output of method checkCredentials()
:
phpunit Method was expected to be called 1 times, actually called 0 times, how to?
I am using phpunit PHPUnitFrameworkTestCase
to test some controller action.
When running PHPUnit tests – is it common to use a separate database for testing?
I’m running tests from the same database as I use in development. I recall using Rails and I used a separate database for testing (mainly coz the tutorial I was going by said so). Made sense though. I was wondering it this was the common way to do things or whether there was an alternative. Can anyone shed a little light on this?
Just jumped into database testing in PHPUnit – not really sure what the purpose of it is
I’ve been reading about database testing in PHPUnit. I’m not exactly sure what it’s purpose is. Should I use this to test schema? E.g. if I have a UNIQUE email column then ensure that I’m not allow duplicate email addresses? (I shouldn’t put this in my class tests then?)