Testing the faytory of result objects.
More...
◆ setUp()
DataFactoryTest::setUp |
( |
| ) |
|
|
protected |
◆ tearDown()
DataFactoryTest::tearDown |
( |
| ) |
|
|
protected |
◆ testAlphanumeric()
DataFactoryTest::testAlphanumeric |
( |
| ) |
|
Definition at line 56 of file DataFactoryTest.php.
58 $dataType = $this->f->alphanumeric(
'someValue');
59 $this->assertInstanceOf(Data\Alphanumeric::class, $dataType);
◆ testDataSize1()
DataFactoryTest::testDataSize1 |
( |
| ) |
|
Definition at line 68 of file DataFactoryTest.php.
70 $dataType = $this->f->dataSize(10,
"MB");
71 $this->assertInstanceOf(Data\DataSize::class, $dataType);
◆ testDataSize2()
DataFactoryTest::testDataSize2 |
( |
| ) |
|
Definition at line 74 of file DataFactoryTest.php.
76 $dataType = $this->f->dataSize(
"10G");
77 $this->assertEquals(10, $dataType->getSize());
78 $this->assertEquals(Data\DataSize::GiB, $dataType->getUnit());
79 $this->assertEquals(10 * Data\DataSize::GiB, $dataType->inBytes());
80 $this->assertInstanceOf(Data\DataSize::class, $dataType);
◆ testError()
DataFactoryTest::testError |
( |
| ) |
|
Definition at line 42 of file DataFactoryTest.php.
44 $result = $this->f->error(
"Something went wrong");
45 $this->assertInstanceOf(Data\Result::class, $result);
46 $this->assertTrue($result->isError());
47 $this->assertFalse($result->isOk());
◆ testOk()
DataFactoryTest::testOk |
( |
| ) |
|
Definition at line 34 of file DataFactoryTest.php.
36 $result = $this->f->ok(3.154);
37 $this->assertInstanceOf(Data\Result::class, $result);
38 $this->assertTrue($result->isOk());
39 $this->assertFalse($result->isError());
◆ testPassword()
DataFactoryTest::testPassword |
( |
| ) |
|
Definition at line 50 of file DataFactoryTest.php.
52 $pwd = $this->f->password(
"secret");
53 $this->assertInstanceOf(Data\Password::class, $pwd);
◆ testPositiveInteger()
DataFactoryTest::testPositiveInteger |
( |
| ) |
|
Definition at line 62 of file DataFactoryTest.php.
64 $dataType = $this->f->positiveInteger(100);
65 $this->assertInstanceOf(Data\PositiveInteger::class, $dataType);
◆ $f
The documentation for this class was generated from the following file: