raelgc / template

PHP Template
http://raelcunha.com/template.php
GNU Lesser General Public License v2.1
72 stars 41 forks source link

Implement a test suite #42

Closed raelgc closed 3 years ago

raelgc commented 4 years ago

Let's not repeat release 2.2.6.

raelgc commented 4 years ago

This will involve:

vaneves commented 4 years ago

Circle is free: https://circleci.com/pricing/

masakik commented 4 years ago

Hi, I´m not fluent in phpunit but if you create the basic structure I can contribute with specific tests.

raelgc commented 4 years ago

Cool! I'll work on to create the basic structure this week.

raelgc commented 4 years ago

Just pushed a draft of this on branch 42-tests

masakik commented 4 years ago

So, I put checklist at the top of this issue to become easier to watch.

raelgc commented 4 years ago

I just pushed a commit downgrading PHP Unit to support PHP 5 and removing the type coercion.

raelgc commented 4 years ago

I pushed the empty and simple block test cases too. Please, remember to run a git pull before add new test cases.

masakik commented 4 years ago

You missed simple_block.html file.

masakik commented 4 years ago

Is it reasonable use phpunit requirement something like ^5 || ^6 || ^7 || ^8 to support all versions of php?

raelgc commented 4 years ago

@masakik I just pushed the missing file, thanks for the warning.

About the requirement version for PHPUnit: I think we should keep the lowest denominator here. My concern is if we introduce any syntax on tests that is not valid in old versions and miss that due the fact we're using a new version.

raelgc commented 3 years ago

I just added all the property and getter tests. I think this is enough to start to setup a CI environment. The only downside is that I had to use anonymous classes and I think this is available only on PHP >= 7.1.