html-object-strings/tests/Containers/ContainerGroupTest.php

23 lines
459 B
PHP
Raw Normal View History

<?php
namespace ByJoby\HTML\Containers;
use PHPUnit\Framework\TestCase;
class ContainerGroupTest extends TestCase
{
public function testCatchAll()
{
$group = ContainerGroup::catchAll();
$this->assertTrue($group->willAccept('Foo'));
}
public function testCatchNone()
{
$group = new ContainerGroup(function () {
return false;
});
$this->assertFalse($group->willAccept('Foo'));
}
}