Skip to content

Commit

Permalink
Adds test for PHP 8.3.
Browse files Browse the repository at this point in the history
  • Loading branch information
ddebin committed Mar 19, 2024
1 parent 69ef497 commit 087666f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-22.04
strategy:
matrix:
php: ['7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2']
php: ['7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3']
name: PHP ${{ matrix.php }}
steps:
- uses: actions/checkout@v3
Expand Down
9 changes: 6 additions & 3 deletions example/feed.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,22 @@

declare(strict_types = 1);

use AtomGenerator\Entry;
use AtomGenerator\Feed;

include_once 'vendor/autoload.php';

$entry = new AtomGenerator\Entry();
$entry = new Entry();
$entry->setTitle('Post', 'text');
$entry->setId('tag:id');
$entry->setContent('Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', 'text');
$entry->setUpdatedDateTime(new DateTime('2019-05-04T21:00:40Z'));

$feed = new AtomGenerator\Feed();
$feed = new Feed();
$feed->setTitle('Blog');
$feed->setUpdatedDateTime(new DateTime('now'));
$feed->addEntry($entry);

assert(AtomGenerator\Feed::validate($feed->getDocument()));
assert(Feed::validate($feed->getDocument()));

echo $feed->saveXML();

0 comments on commit 087666f

Please sign in to comment.