~ubuntu-branches/ubuntu/vivid/php-parser/vivid

« back to all changes in this revision

Viewing changes to test/PhpParser/LexerTest.php

  • Committer: Package Import Robot
  • Author(s): David Prévot, nikic, David Prévot
  • Date: 2014-10-16 22:04:02 UTC
  • mfrom: (1.1.3)
  • Revision ID: package-import@ubuntu.com-20141016220402-kbqssv91y2t8ouk3
Tags: 1.0.1-1
[ nikic ]
* Disallow new without a class name
* Fix var_dump truncation with xdebug in php-parse.php
* Add ability to pass code directly to php-parse.php
* Release version 1.0.1

[ David Prévot ]
* Improve manual page generation

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
        try {
19
19
            $this->lexer->startLexing($code);
20
20
        } catch (Error $e) {
21
 
            $this->assertEquals($message, $e->getMessage());
 
21
            $this->assertSame($message, $e->getMessage());
22
22
 
23
23
            return;
24
24
        }
42
42
        while ($id = $this->lexer->getNextToken($value, $startAttributes, $endAttributes)) {
43
43
            $token = array_shift($tokens);
44
44
 
45
 
            $this->assertEquals($token[0], $id);
46
 
            $this->assertEquals($token[1], $value);
 
45
            $this->assertSame($token[0], $id);
 
46
            $this->assertSame($token[1], $value);
47
47
            $this->assertEquals($token[2], $startAttributes);
48
48
            $this->assertEquals($token[3], $endAttributes);
49
49
        }
131
131
 
132
132
        while (Parser::T_HALT_COMPILER !== $this->lexer->getNextToken());
133
133
 
134
 
        $this->assertEquals($this->lexer->handleHaltCompiler(), $remaining);
135
 
        $this->assertEquals(0, $this->lexer->getNextToken());
 
134
        $this->assertSame($this->lexer->handleHaltCompiler(), $remaining);
 
135
        $this->assertSame(0, $this->lexer->getNextToken());
136
136
    }
137
137
 
138
138
    public function provideTestHaltCompiler() {