* * For the full copyright and license information, please view the "LICENSE.md" * file that was distributed with this source code. */ declare(strict_types=1); namespace Respect\Validation\Rules; use Respect\Validation\Test\RuleTestCase; use SplFileInfo; use stdClass; /** * @group rule * * @covers \Respect\Validation\Rules\Readable * * @author Danilo Correa * @author Henrique Moody */ final class ReadableTest extends RuleTestCase { /** * {@inheritdoc} */ public function providerForValidInput(): array { $file = $this->getFixtureDirectory().'/valid-image.gif'; $rule = new Readable(); return [ [$rule, $file], [$rule, new SplFileInfo($file)], ]; } /** * {@inheritdoc} */ public function providerForInvalidInput(): array { $file = $this->getFixtureDirectory().'/invalid-image.gif'; $rule = new Readable(); return [ [$rule, $file], [$rule, new SplFileInfo($file)], [$rule, new stdClass()], ]; } }