updated-packages

This commit is contained in:
RafficMohammed
2023-01-08 00:13:22 +05:30
parent 3ff7df7487
commit da241bacb6
12659 changed files with 563377 additions and 510538 deletions

View File

@@ -24,9 +24,7 @@ class PHP_Token_ClassTest extends TestCase
protected function setUp()
{
$ts = new PHP_Token_Stream(TEST_FILES_PATH . 'source2.php');
foreach ($ts as $token) {
foreach (new PHP_Token_Stream(TEST_FILES_PATH . 'source2.php') as $token) {
if ($token instanceof PHP_Token_CLASS) {
$this->class = $token;
}
@@ -38,25 +36,16 @@ class PHP_Token_ClassTest extends TestCase
}
}
/**
* @covers PHP_Token_CLASS::getKeywords
*/
public function testGetClassKeywords()
{
$this->assertEquals('abstract', $this->class->getKeywords());
}
/**
* @covers PHP_Token_FUNCTION::getKeywords
*/
public function testGetFunctionKeywords()
{
$this->assertEquals('abstract,static', $this->function->getKeywords());
}
/**
* @covers PHP_Token_FUNCTION::getVisibility
*/
public function testGetFunctionVisibility()
{
$this->assertEquals('public', $this->function->getVisibility());
@@ -64,9 +53,7 @@ class PHP_Token_ClassTest extends TestCase
public function testIssue19()
{
$ts = new PHP_Token_Stream(TEST_FILES_PATH . 'issue19.php');
foreach ($ts as $token) {
foreach (new PHP_Token_Stream(TEST_FILES_PATH . 'issue19.php') as $token) {
if ($token instanceof PHP_Token_CLASS) {
$this->assertFalse($token->hasInterfaces());
}
@@ -143,9 +130,7 @@ class PHP_Token_ClassTest extends TestCase
*/
public function testClassWithMethodNamedEmptyIsHandledCorrectly()
{
$ts = new PHP_Token_Stream(TEST_FILES_PATH . 'class_with_method_named_empty.php');
$classes = $ts->getClasses();
$classes = (new PHP_Token_Stream(TEST_FILES_PATH . 'class_with_method_named_empty.php'))->getClasses();
$this->assertArrayHasKey('class_with_method_named_empty', $classes);
$this->assertArrayHasKey('empty', $classes['class_with_method_named_empty']['methods']);
@@ -156,9 +141,7 @@ class PHP_Token_ClassTest extends TestCase
*/
public function testAnonymousFunctionDoesNotAffectStartAndEndLineOfMethod()
{
$ts = new PHP_Token_Stream(TEST_FILES_PATH . 'php-code-coverage-issue-424.php');
$classes = $ts->getClasses();
$classes = (new PHP_Token_Stream(TEST_FILES_PATH . 'php-code-coverage-issue-424.php'))->getClasses();
$this->assertSame(5, $classes['Example']['methods']['even']['startLine']);
$this->assertSame(12, $classes['Example']['methods']['even']['endLine']);