-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathValidatorTest.php
More file actions
27 lines (24 loc) · 950 Bytes
/
ValidatorTest.php
File metadata and controls
27 lines (24 loc) · 950 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?php
namespace Webdevcave\SchemaValidator\Tests;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\TestCase;
use Webdevcave\SchemaValidator\Schemas\ArraySchema;
use Webdevcave\SchemaValidator\Schemas\NumericSchema;
use Webdevcave\SchemaValidator\Schemas\ObjectSchema;
use Webdevcave\SchemaValidator\Schemas\StringSchema;
use Webdevcave\SchemaValidator\Validator;
#[CoversClass(Validator::class)]
#[CoversClass(StringSchema::class)]
#[CoversClass(NumericSchema::class)]
#[CoversClass(ObjectSchema::class)]
#[CoversClass(ArraySchema::class)]
class ValidatorTest extends TestCase
{
public function testBuilders()
{
$this->assertInstanceOf(StringSchema::class, Validator::string());
$this->assertInstanceOf(NumericSchema::class, Validator::numeric());
$this->assertInstanceOf(ObjectSchema::class, Validator::object());
$this->assertInstanceOf(ArraySchema::class, Validator::array());
}
}