[User Error] TestRunner::only(): Invalid TestCase 'SapphireTest', cannot find matching class
Sounds like you're trying to run the SapphireTest? That itself is not a test so you have to give it either a test case, module name or all.
running /dev/tests/all should run all the tests and /dev/tests/ should show the list of all the tests. Make sure that page isn't just loading. If it doesn't work in a browser try using sake.
Running the full test suite can take a while on some databases (I'm sitting at ~5 mins for full suite on mysql). One trick we employ is using SQLite3 when running tests which reduces it massively see https://github.com/chillu/silverstripe-doc-restructuring/blob/master/master/sapphire/docs/en/howto/phpunit-configuration.md
Well, I'm trying this on my development environment. I assume tests work also in 'dev' mode.
browser Running /dev/tests/all takes about 5 seconds and the output looks like: - absolutely no hints about failures.
All I want is to run CurrencyFieldTest and see what failures occour (if any). So I tried calling /dev/tests/CurrencyFieldTest but the output always remains the same, no matter what I put in /sapphire/tests/forms/CurrencyFieldTest.php:
sake Sake behaves similarly. It takes only about 1 second and produces no output (except some self-produced notices) when starting it by:
Try checking out your php error log, something could be segfaulting or another possible issue is if you have a loose die lying around in your code or some config files. Seen people if if(!$var) die(); and $var may not exist when running tests. Hopefully you get an error message to start off with.
PHP Fatal error: Couldn't run query: \nCREATE DATABASE `tmpdb5733285` \n\nAccess denied for user 'devel'@'myhost.de' to database 'tmpdb5733285' in /silverstripe_base/sapphire/core/model/MySQLDatabase.php on line 526, referer: http://127.0.0.1/dev/tests
My Database user had only usage privileges...the super privilege fixed this (adding only create privilege does not help much, due to "check" queries). Increasing memory limit (php.ini) to 256MB was also required, 128MB was not sufficient. Thanks a lot!