run-tests.php file still up to date?

I've just now installed Phalcon. The command line said something about libraries to be found in "../cphalcon/build/64bits". I took a look out of curiosity, but the only php file I found there was "run-tests.php"

I decided to run the file and ran in to a file write permission error, which I had apparently forgot to set.

Looking at the code however, I found the following, on line 1023: if (file_put_contents($filename, $text, FILE_BINARY) === false) {

I didn't recognize the FILE_BINARY flag, so I decided to look it up. I found the following explanation: http://www.tutorialspoint.com/php/php%5function%5file%5put%5contents.htm

The page mentions this flag would have been part of PHP6. Which was cancelled.

So I guess the main question is: is this run-tests.php file supposed to be included in the build of Phalcon and if so, is it still up to date?



83.4k

Hi Koen, "run-tests.php" is generated by phpize that is the utility provided by PHP to generate the extension skeletons before compiling them.

We have two test suites, we're migrating this test-suite: https://github.com/phalcon/cphalcon/tree/master/unit-tests#phalcon-unit-tests to this: https://github.com/phalcon/cphalcon/tree/master/php-tests#phalcon-unit-tests

Every time we add a change to the repository both test suites are run in Travis-CI to ensure that the extension is stable.

You can see the test running there for each PHP version: https://travis-ci.org/phalcon/cphalcon and

https://travis-ci.org/phalcon/cphalcon/jobs/6100954#L1810 https://travis-ci.org/phalcon/cphalcon/jobs/6100954#L2708

Ah, nice to know. So basically, run-tests.php is generated by phpize and has not much to do with phalcon itself?

Just wondering what the significance of it is. Just something phpize pumps in there?



83.4k

Exactly, run-tests.php has no relation with phalcon, it's something created by phpize. We use phpunit for our tests :)

Thanks for bothering to reply to this simple question.