Пример #1
0
 public function testGetTokenIdsOfParenthesisPair()
 {
     $this->object->seek(0);
     $this->object->gotoNextByType(T_FUNCTION, 0);
     $result = $this->object->getTokenIdsOfParenthesisPair();
     $this->assertInternalType('array', $result, 'Expected result to be an array');
     $this->assertArrayHasKey(0, $result, 'Expected result to have a start element');
     $this->assertArrayHasKey(1, $result, 'Expected result to have an end element');
     $this->assertEquals(17, $result[0], 'Expected the first brace to be at token id 17');
     $this->assertEquals(18, $result[1], 'Expected the closing brace to be at token id 18');
 }