function TestClassMethodMetadataTest::testRule

Same name and namespace in other branches
  1. 11.x core/tests/PHPStan/tests/TestClassMethodMetadataTest.php \Drupal\PHPStan\Tests\TestClassMethodMetadataTest::testRule()

File

core/tests/PHPStan/tests/TestClassMethodMetadataTest.php, line 39

Class

TestClassMethodMetadataTest
Tests TestClassMethodMetadata rule.

Namespace

Drupal\PHPStan\Tests

Code

public function testRule() : void {
  $this->analyse([
    __DIR__ . '/../fixtures/test-methods-with-metadata.php',
  ], [
    [
      'Test method testWithAttributeAndForbiddenAnnotation must not add annotation @group.',
      21,
    ],
    [
      'Test method testWithForbiddenAnnotation must not add annotation @group.',
      35,
    ],
    [
      'Test method testInTraitWithAttributeAndForbiddenAnnotation must not add annotation @group.',
      69,
    ],
    [
      'Test method testInTraitWithForbiddenAnnotation must not add annotation @group.',
      83,
    ],
  ]);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.