Testing the faytory of result objects.
More...
◆ setUp()
DataFactoryTest::setUp |
( |
| ) |
|
|
protected |
◆ tearDown()
DataFactoryTest::tearDown |
( |
| ) |
|
|
protected |
◆ testAlphanumeric()
DataFactoryTest::testAlphanumeric |
( |
| ) |
|
Definition at line 54 of file DataFactoryTest.php.
55 {
56 $dataType = $this->f->alphanumeric('someValue');
57 $this->assertInstanceOf(Data\Alphanumeric::class, $dataType);
58 }
◆ testDataSize1()
DataFactoryTest::testDataSize1 |
( |
| ) |
|
Definition at line 90 of file DataFactoryTest.php.
91 {
92 $dataType = $this->f->dataSize(10, "MB");
93 $this->assertInstanceOf(Data\DataSize::class, $dataType);
94 }
◆ testDataSize2()
DataFactoryTest::testDataSize2 |
( |
| ) |
|
Definition at line 96 of file DataFactoryTest.php.
97 {
98 $dataType = $this->f->dataSize("10G");
99 $this->assertEquals(10, $dataType->getSize());
100 $this->assertEquals(Data\DataSize::GiB, $dataType->getUnit());
101 $this->assertEquals(10 * Data\DataSize::GiB, $dataType->inBytes());
102 $this->assertInstanceOf(Data\DataSize::class, $dataType);
103 }
◆ testError()
DataFactoryTest::testError |
( |
| ) |
|
◆ testFloatRange()
DataFactoryTest::testFloatRange |
( |
| ) |
|
Definition at line 78 of file DataFactoryTest.php.
79 {
80 $dataType = $this->f->openedFloatInterval(1.4, 100.2);
81 $this->assertInstanceOf(Data\Interval\OpenedFloatInterval::class, $dataType);
82 }
◆ testIntegerRange()
DataFactoryTest::testIntegerRange |
( |
| ) |
|
Definition at line 66 of file DataFactoryTest.php.
67 {
68 $dataType = $this->f->openedIntegerInterval(1, 100);
69 $this->assertInstanceOf(Data\Interval\OpenedIntegerInterval::class, $dataType);
70 }
◆ testOk()
DataFactoryTest::testOk |
( |
| ) |
|
◆ testPassword()
DataFactoryTest::testPassword |
( |
| ) |
|
Definition at line 48 of file DataFactoryTest.php.
49 {
50 $pwd = $this->f->password("secret");
51 $this->assertInstanceOf(Data\Password::class, $pwd);
52 }
◆ testPositiveInteger()
DataFactoryTest::testPositiveInteger |
( |
| ) |
|
Definition at line 60 of file DataFactoryTest.php.
61 {
62 $dataType = $this->f->positiveInteger(100);
63 $this->assertInstanceOf(Data\PositiveInteger::class, $dataType);
64 }
◆ testStrictFloatRange()
DataFactoryTest::testStrictFloatRange |
( |
| ) |
|
Definition at line 84 of file DataFactoryTest.php.
85 {
86 $dataType = $this->f->closedFloatInterval(1.4, 100.2);
87 $this->assertInstanceOf(Data\Interval\ClosedFloatInterval::class, $dataType);
88 }
◆ testStrictIntegerRange()
DataFactoryTest::testStrictIntegerRange |
( |
| ) |
|
Definition at line 72 of file DataFactoryTest.php.
73 {
74 $dataType = $this->f->closedIntegerInterval(1, 100);
75 $this->assertInstanceOf(Data\Interval\ClosedIntegerInterval::class, $dataType);
76 }
◆ $f
The documentation for this class was generated from the following file: