Closed Henni closed 8 years ago
@nutzmdm can you test & review this since it fixes your reported issue #80 :)
@v1r0x could you take a look, please? This PR would allow us to start writing tests for our backend.
@Henni any instructions what to do? I tried to test it, but got a couple of errors.
@v1r0x Which errors did you get?
PHP Fatal error: Class 'OCA\Maps\AppInfo\Application' not found in maps/tests/controller/pagecontrollertest.php on line 27
if I try to run it from inside the tests/ folder
@v1r0x The idea is that you can now run phpunit
from the root folder (maps/
).
@Henni then I get this error:
Cannot open file "/var/www/html/owncloud/apps/maps/../../tests/bootstrap.php".
@v1r0x Could you verify that this file actually doesn't exist?
the folder tests in the oc root folder does not exists. Do I need something for that?
@v1r0x You probably installed owncloud using the archives from owncloud.org which don't contain tests. Think about using ocdev instead which actually clones the git repo and has some additional functionality like code checks.
@Henni thanks for the link, will test later
:+1:
There are currently (almost) no tests. This pull request simply reorganizes the test files.
Until now the phpunit.xml in the root folder wasn't used at all and lead to errors if one tried ( see #80 ). Now this file is actually used and i moved all tests from the subfolder
tests/unit/
totests/
.The only existing test is for the pagecontroller and isn't complete. So let's start building tests!
cc @nutzmdm @v1r0x @DJaeger fixes #80