diff --git a/src/Tests/TestInterface.php b/src/Tests/TestInterface.php index 488f82a..3ada3a4 100644 --- a/src/Tests/TestInterface.php +++ b/src/Tests/TestInterface.php @@ -72,7 +72,7 @@ public function doValidateFile($type); /** * - * @return bool + * @return string */ public function testName(); diff --git a/src/Tests/Tests/epv_test_validate_linefeeds.php b/src/Tests/Tests/epv_test_validate_linefeeds.php index 427afdb..b7efba2 100644 --- a/src/Tests/Tests/epv_test_validate_linefeeds.php +++ b/src/Tests/Tests/epv_test_validate_linefeeds.php @@ -11,27 +11,12 @@ use Phpbb\Epv\Files\FileInterface; -use Phpbb\Epv\Files\Type\LangFileInterface; use Phpbb\Epv\Files\Type\PHPFileInterface; use Phpbb\Epv\Output\Output; use Phpbb\Epv\Output\OutputInterface; use Phpbb\Epv\Tests\BaseTest; use Phpbb\Epv\Tests\Exception\TestException; use Phpbb\Epv\Tests\Type; -use PHPParser_Error; -use PHPParser_Lexer_Emulative; -use PHPParser_Node; -use PHPParser_Node_Expr_Exit; -use PHPParser_Node_Expr_FuncCall; -use PHPParser_Node_Expr_Print; -use PHPParser_Node_Expr_Variable; -use PHPParser_Node_Stmt_Class; -use PHPParser_Node_Stmt_Echo; -use PHPParser_Node_Stmt_If; -use PHPParser_Node_Stmt_Interface; -use PHPParser_Node_Stmt_Namespace; -use PHPParser_Node_Stmt_Use; -use PHPParser_Parser; class epv_test_validate_linefeeds extends BaseTest @@ -49,8 +34,6 @@ public function __construct($debug, OutputInterface $output, $basedir, $namespac parent::__construct($debug, $output, $basedir, $namespace, $titania, $opendir); $this->fileTypeFull = Type::TYPE_PHP; - $this->parser = new PHPParser_Parser(new PHPParser_Lexer_Emulative()); - $this->totalFileTests = 2; } /** @@ -101,6 +84,6 @@ private function addMessage($type, $message) */ public function testName() { - return 'Validate php structure and deprecated functions'; + return 'Validate linefeeds'; } } diff --git a/src/Tests/Tests/epv_test_validate_php_functions.php b/src/Tests/Tests/epv_test_validate_php_functions.php index 28ccf77..98f778c 100644 --- a/src/Tests/Tests/epv_test_validate_php_functions.php +++ b/src/Tests/Tests/epv_test_validate_php_functions.php @@ -105,7 +105,6 @@ public function __construct($debug, OutputInterface $output, $basedir, $namespac $this->fileTypeFull = Type::TYPE_PHP; $this->parser = new PHPParser_Parser(new PHPParser_Lexer_Emulative()); - $this->totalFileTests = 2; } /** diff --git a/tests/php_exporter_test.php b/tests/php_exporter_test.php index fbedfed..edf262e 100644 --- a/tests/php_exporter_test.php +++ b/tests/php_exporter_test.php @@ -33,7 +33,7 @@ public function extension_data() public function test_event_name($line, $content, $expected_name, $expected_errors = null) { $output = new \Phpbb\Epv\Tests\Mock\Output(); - $exporter = new \Phpbb\Epv\Events\php_exporter($output); + $exporter = new \Phpbb\Epv\Events\php_exporter($output, ''); $exporter->set_content(file($content)); $name = $exporter->get_event_name($line, false);