Skip to content

Extended Util/Common.php not found in unit tests. (3.0.1) #1564

@louisl

Description

@louisl

I've extended Util/Common.php for some DRY arrays and functions, this all works fine when sniffing and fixing, but when a unit test file tests a sniff that 'use's the extended Common.php it's chucking out a class not found error.

Is this something the autoloading should do? or is it something I need to alter?

$ ./vendor/bin/phpunit --debug --filter CodeIgniter4 ./tests/AllTests.php PHPUnit 4.8.36 by Sebastian Bergmann and contributors. Starting test 'CodeIgniter4\Tests\Arrays\ArrayDeclarationUnitTest::testSniff'. . Starting test 'CodeIgniter4\Tests\NamingConventions\ValidMethodNameUnitTest::testSniff'. PHP Fatal error: Class 'CodeIgniter4\Util\Common' not found in /Users/louislinehan/Documents/Projects/CodeIgniter4-Standard/CodeIgniter4/Sniffs/NamingConventions/ValidMethodNameSniff.php on line 98 

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions