php-codesniffer/tests/DigiComp/Sniffs/ClassNames/MissingAbstractPrefixSniffTest.php

21 lines
545 B
PHP
Raw Normal View History

2021-08-01 13:33:41 +02:00
<?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());
}
}