20 lines
545 B
PHP
20 lines
545 B
PHP
<?php
|
|
|
|
namespace DigiComp\PhpCodesniffer\DigiComp\Sniffs\ClassNames;
|
|
|
|
use SlevomatCodingStandard\Sniffs\TestCase;
|
|
|
|
class MissingAbstractPrefixSniffTest extends TestCase
|
|
{
|
|
public function testErrors(): void
|
|
{
|
|
$report = self::checkFile(__DIR__ . '/data/ClassMissingAbstractPrefix.php');
|
|
self::assertSame(1, $report->getErrorCount());
|
|
}
|
|
|
|
public function testNoErrors(): void
|
|
{
|
|
$report = self::checkFile(__DIR__ . '/data/AbstractClass.php');
|
|
self::assertSame(0, $report->getErrorCount());
|
|
}
|
|
}
|