gmail-filter-builder/tests/Unit/HelpersTest.php
Oliver Davies 8b38214205 Add a filter() helper method
Add a namespaced `filter()` method that can be imported via `use
function` and use it as an alternative for `new Filter` or
`Filter::create()`.

This provides a cleaner, easier to read syntax - particularly if you
have a lot of filters in the same file.

(cherry picked from commit 330d6f9393)
2020-07-11 01:26:38 +01:00

18 lines
364 B
PHP

<?php
declare(strict_types=1);
use PHPUnit\Framework\TestCase;
use Opdavies\GmailFilterBuilder\Model\Filter as FilterClass;
use function Opdavies\GmailFilterBuilder\filter;
final class HelpersTest extends TestCase
{
/** @test */
public function it_returns_a_filter_object(): void
{
$this->assertEquals(new FilterClass(), filter());
}
}