3
* This file is part of the PHP_TokenStream package.
5
* (c) Sebastian Bergmann <sebastian@phpunit.de>
7
* For the full copyright and license information, please view the LICENSE
8
* file that was distributed with this source code.
12
* Tests for the PHP_Token_REQUIRE_ONCE, PHP_Token_REQUIRE
13
* PHP_Token_INCLUDE_ONCE and PHP_Token_INCLUDE_ONCE classes.
15
* @package PHP_TokenStream
17
* @author Laurent Laville <pear@laurent-laville.org>
18
* @copyright Sebastian Bergmann <sebastian@phpunit.de>
19
* @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
20
* @version Release: @package_version@
21
* @link http://github.com/sebastianbergmann/php-token-stream/
22
* @since Class available since Release 1.0.2
24
class PHP_Token_IncludeTest extends PHPUnit_Framework_TestCase
28
protected function setUp()
30
$this->ts = new PHP_Token_Stream(TEST_FILES_PATH . 'source3.php');
34
* @covers PHP_Token_Includes::getName
35
* @covers PHP_Token_Includes::getType
37
public function testGetIncludes()
40
array('test4.php', 'test3.php', 'test2.php', 'test1.php'),
41
$this->ts->getIncludes()
46
* @covers PHP_Token_Includes::getName
47
* @covers PHP_Token_Includes::getType
49
public function testGetIncludesCategorized()
53
'require_once' => array('test4.php'),
54
'require' => array('test3.php'),
55
'include_once' => array('test2.php'),
56
'include' => array('test1.php')
58
$this->ts->getIncludes(TRUE)
63
* @covers PHP_Token_Includes::getName
64
* @covers PHP_Token_Includes::getType
66
public function testGetIncludesCategory()
70
$this->ts->getIncludes(TRUE, 'require_once')