You are here

protected function PHP_Token_FunctionTest::setUp in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/phpunit/php-token-stream/tests/Token/FunctionTest.php \PHP_Token_FunctionTest::setUp()

Sets up the fixture, for example, open a network connection. This method is called before a test is executed.

Overrides PHPUnit_Framework_TestCase::setUp

File

vendor/phpunit/php-token-stream/tests/Token/FunctionTest.php, line 27

Class

PHP_Token_FunctionTest
Tests for the PHP_Token_FUNCTION class.

Code

protected function setUp() {
  $ts = new PHP_Token_Stream(TEST_FILES_PATH . 'source.php');
  foreach ($ts as $token) {
    if ($token instanceof PHP_Token_FUNCTION) {
      $this->functions[] = $token;
    }
  }
}