Answer the question
In order to leave comments, you need to log in
How to find out in php what tests are in the directory?
I need to get data by pressing a button (on request), or rather an array in which there will be a project, file name, method, etc. All this lies in the tests directory and unit tests are located there, how can this be implemented?
ps: the logic is something like this in the tests folder, it looks for a directory, let's say p1, in this directory it looks for php files, let's say Test.php, in this file there are methods test_foo and others, the
tests array:
p1, Test, foo
p1, Test, foo2
p1, Test2, foo
p2, Test, foo
Answer the question
In order to leave comments, you need to log in
https://www.php.net/manual/en/function.scandir.php
or do you want the code to be written for you? the question has already been,
it seems to me that you should not start with tests, but in general with some kind of textbook
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question