Skip to content

Commit

Permalink
Fix the tests. Also some cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
paul999 committed Dec 13, 2014
1 parent 1a550e5 commit 07e017e
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 21 deletions.
2 changes: 1 addition & 1 deletion src/Tests/TestInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public function doValidateFile($type);

/**
*
* @return bool
* @return string
*/
public function testName();

Expand Down
19 changes: 1 addition & 18 deletions src/Tests/Tests/epv_test_validate_linefeeds.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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;
}

/**
Expand Down Expand Up @@ -101,6 +84,6 @@ private function addMessage($type, $message)
*/
public function testName()
{
return 'Validate php structure and deprecated functions';
return 'Validate linefeeds';
}
}
1 change: 0 additions & 1 deletion src/Tests/Tests/epv_test_validate_php_functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion tests/php_exporter_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 07e017e

Please sign in to comment.