Functional\Tests\AbstractTestCase::setUp PHP Méthode

setUp() public méthode

public setUp ( )
    public function setUp()
    {
        $this->functions = F\flatten((array) (func_num_args() > 0 ? func_get_arg(0) : $this->getFunctionName()));
        foreach ($this->functions as $function) {
            if (!function_exists($function)) {
                $this->markTestSkipped(sprintf('Function "%s()" not implemented in %s version', $function, extension_loaded('functional') ? 'native C' : 'PHP userland'));
                break;
            }
        }
    }

Usage Example

 public function setUp()
 {
     parent::setUp();
     $this->list = [1, "foo", 5.1, 5, "5.2", true, false, [], new stdClass()];
     $this->listIterator = new ArrayIterator($this->list);
     $this->hash = ['k1' => 1, 'k2' => '5.2', 'k3' => 5, 'k4' => '5.1', 'k5' => 10.2, 'k6' => true, 'k7' => [], 'k8' => new stdClass(), 'k9' => -10];
     $this->hashIterator = new ArrayIterator($this->hash);
 }
All Usage Examples Of Functional\Tests\AbstractTestCase::setUp