public function ProjectUnitTest::testProjectNameDetection in Coder 8.3
Same name and namespace in other branches
- 8.3.x tests/DrupalPractice/ProjectDetection/ProjectUnitTest.php \DrupalPractice\Test\ProjectDetection\ProjectUnitTest::testProjectNameDetection()
Tests the extending classes Sniff class.
@dataProvider projectNameDetectionProvider
Parameters
string $filename Name of the file that will be checked.:
string $projectname Expected project name for the file.:
Return value
void
File
- tests/
DrupalPractice/ ProjectDetection/ ProjectUnitTest.php, line 133
Class
- ProjectUnitTest
- Tests that project and version detection works.
Namespace
DrupalPractice\Test\ProjectDetectionCode
public function testProjectNameDetection($filename, $projectname) {
$this->phpcsFile
->expects($this
->any())
->method('getFilename')
->will($this
->returnValue($filename));
$this
->assertEquals(Project::getName($this->phpcsFile), $projectname);
}