mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-01 06:28:46 +02:00
Merge remote-tracking branch 'origin/support/2.7' into support/3.0
# Conflicts: # application/cmdbabstract.class.inc.php # application/utils.inc.php # core/coreexception.class.inc.php # core/userrights.class.inc.php # datamodels/2.x/itop-portal-base/portal/src/Form/ObjectFormManager.php # tests/php-unit-tests/README.md # tests/php-unit-tests/unitary-tests/core/DBObjectTest.php
This commit is contained in:
@@ -59,6 +59,16 @@ Fix that in the XML configuration in the PHP section
|
||||
<ini name="memory_limit" value="512M"/>
|
||||
```
|
||||
|
||||
|
||||
### Measure the time spent in a test
|
||||
|
||||
Simply cut'n paste the following line at several places within the test function:
|
||||
|
||||
```php
|
||||
if (isset($fStarted)) {echo 'L'.__LINE__.': '.round(microtime(true) - $fStarted, 3)."\n";} $fStarted = microtime(true);
|
||||
```
|
||||
|
||||
|
||||
### Understand tests interactions
|
||||
|
||||
With PHPStorm, select two tests, right click to get the context menu, then `run`.
|
||||
@@ -119,4 +129,3 @@ This won't work because the comment MUST start with `/**` (two stars) to be cons
|
||||
|
||||
Therefore, if the tests are isolated, then `setupBeforeClass` will be called as often as `setUp`.
|
||||
|
||||
This has been proven with [`runClassInSeparateProcessTest.php`](experiments/runClassInSeparateProcessTest.php)
|
||||
Reference in New Issue
Block a user