archetype icon indicating copy to clipboard operation
archetype copied to clipboard

running phpunit tests

Open tacman opened this issue 2 years ago • 1 comments

I forked this to see if I could figure out a way to use it Symfony, and the first thing I did was run composer install and then try to run the tests.

How should tests be run?

endor/bin/phpunit 
PHP Fatal error:  Uncaught Error: Call to undefined function describe() in /home/tac/g/tacman/archetype/tests/Unit/Facades/PHPFileTest.php:10
Stack trace:
#0 /home/tac/g/tacman/archetype/vendor/phpunit/phpunit/src/Util/FileLoader.php(66): include_once()
#1 /home/tac/g/tacman/archetype/vendor/phpunit/phpunit/src/Util/FileLoader.php(49): PHPUnit\Util\FileLoader::load()
#2 /home/tac/g/tacman/archetype/vendor/phpunit/phpunit/src/Framework/TestSuite.php(397): PHPUnit\Util\FileLoader::checkAndLoad()
#3 /home/tac/g/tacman/archetype/vendor/phpunit/phpunit/src/Framework/TestSuite.php(536): PHPUnit\Framework\TestSuite->addTestFile()
#4 /home/tac/g/tacman/archetype/vendor/phpunit/phpunit/src/TextUI/TestSuiteMapper.php(67): PHPUnit\Framework\TestSuite->addTestFiles()
#5 /home/tac/g/tacman/archetype/vendor/phpunit/phpunit/src/TextUI/Command.php(389): PHPUnit\TextUI\TestSuiteMapper->map()
#6 /home/tac/g/tacman/archetype/vendor/phpunit/phpunit/src/TextUI/Command.php(112): PHPUnit\TextUI\Command->handleArguments()
#7 /home/tac/g/tacman/archetype/vendor/phpunit/phpunit/src/TextUI/Command.php(97): PHPUnit\TextUI\Command->run()
#8 /home/tac/g/tacman/archetype/vendor/phpunit/phpunit/phpunit(107): PHPUnit\TextUI\Command::main()
#9 /home/tac/g/tacman/archetype/vendor/bin/phpunit(122): include('...')
#10 {main}

Next PHPUnit\TextUI\RuntimeException: Call to undefined function describe() in /home/tac/g/tacman/archetype/vendor/phpunit/phpunit/src/TextUI/Command.php:99
Stack trace:
#0 /home/tac/g/tacman/archetype/vendor/phpunit/phpunit/phpunit(107): PHPUnit\TextUI\Command::main()
#1 /home/tac/g/tacman/archetype/vendor/bin/phpunit(122): include('...')
#2 {main}
  thrown in /home/tac/g/tacman/archetype/vendor/phpunit/phpunit/src/TextUI/Command.php on line 9

tacman avatar Dec 06 '23 14:12 tacman

https://github.com/ajthinking/archetype#development-installation

It uses PEST for testing, a wrapper around PHPUnit

ajthinking avatar Dec 07 '23 08:12 ajthinking