Add publish_date and expiry_date support
This commit is contained in:
parent
a22281c896
commit
4448798bf5
6 changed files with 148 additions and 3 deletions
21
devel/tests/helpers/is_visible.phpt
Normal file
21
devel/tests/helpers/is_visible.phpt
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
--TEST--
|
||||
isVisible: returns true when metadata is null or date fields absent
|
||||
--FILE--
|
||||
<?php
|
||||
require '/var/www/app/hooks.php';
|
||||
require '/var/www/app/context.php';
|
||||
require '/var/www/app/helpers.php';
|
||||
|
||||
// Null metadata = always visible
|
||||
echo isVisible(null) ? "true\n" : "false\n";
|
||||
|
||||
// Empty array = always visible
|
||||
echo isVisible([]) ? "true\n" : "false\n";
|
||||
|
||||
// Metadata without date fields = always visible
|
||||
echo isVisible(['title' => 'Hello']) ? "true\n" : "false\n";
|
||||
?>
|
||||
--EXPECT--
|
||||
true
|
||||
true
|
||||
true
|
||||
Loading…
Add table
Add a link
Reference in a new issue