Fix phpunit tests ('Attempt to read property "rrule_loop_limit" on null') and add them to 'make test'

This commit is contained in:
Florian Schlichting 2023-03-13 21:56:13 +01:00
parent b40c96debb
commit 477425f3fe
4 changed files with 11 additions and 2 deletions

View File

@ -71,9 +71,11 @@ test:
exit 1; \
else \
rm test-syntax; \
echo "OK (Syntax checked)"; \
exit 0; \
fi
# run phpunit tests
phpunit testing/phpunit
.PHONY: clean

3
debian/control vendored
View File

@ -11,7 +11,8 @@ Build-Depends: debhelper-compat (= 13),
libawl-php (>= 0.64-1~), libawl-php (<< 0.65),
gettext,
doxygen,
php-cli | php5-cli
php-cli | php5-cli,
phpunit
Vcs-Git: https://gitlab.com/davical-project/davical.git
Vcs-Browser: https://gitlab.com/davical-project/davical
Homepage: https://www.davical.org/

View File

@ -7,6 +7,9 @@ require_once('vCalendar.php');
use PHPUnit\Framework\TestCase;
$c = (object) array();
$c->rrule_loop_limit = 100;
// 1PM-2PM Monday-Thursday (only for one week), NZ time
$base_cal = new vCalendar("BEGIN:VCALENDAR
PRODID:-//Mozilla.org/NONSGML Mozilla Calendar V1.1//EN

View File

@ -7,6 +7,9 @@ require_once('vCalendar.php');
use PHPUnit\Framework\TestCase;
$c = (object) array();
$c->rrule_loop_limit = 100;
final class RangeTest extends TestCase
{
public function testGetVCalendarRange() {