Project

General

Profile

« Previous | Next » 

Revision 7c808239

Added by Andreas Kohlbecker over 4 years ago

ref #8771 phpunit improving test suite setup

View differences:

modules/cdm_dataportal/test/phpUnit/src/unit/StatisticalValuesTest.php
1 1
<?php
2

  
3
// using namespace to allow for better sorting of test classes in the results
4
namespace test\phpunit\unit;
5

  
6

  
2 7
use PHPUnit\Framework\TestCase;
3 8

  
4 9
// these includes require <includePath>../..</includePath> to be set in phpUnit.xml
......
13 18
class StatisticalValuesTest extends TestCase {
14 19

  
15 20
  function new_statistical_value($value = null){
16
    $stat_val = new stdClass();
21
    $stat_val = new \stdClass(); // need to use the root namespace
17 22
    $stat_val->_value = $value;
18 23
    return $stat_val;
19 24
  }

Also available in: Unified diff