mirror of
https://github.com/opdavies/gmail-filter-builder.git
synced 2025-01-22 20:17:31 +00:00
Oliver Davies
8b38214205
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
)
18 lines
364 B
PHP
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());
|
|
}
|
|
}
|