ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
DataFactoryTest Class Reference

Testing the faytory of result objects. More...

+ Inheritance diagram for DataFactoryTest:
+ Collaboration diagram for DataFactoryTest:

Public Member Functions

 testOk ()
 
 testError ()
 

Protected Member Functions

 setUp ()
 
 tearDown ()
 

Detailed Description

Testing the faytory of result objects.

Author
Stefan Hecken stefa.nosp@m.n.he.nosp@m.cken@.nosp@m.conc.nosp@m.epts-.nosp@m.and-.nosp@m.train.nosp@m.ing..nosp@m.de

Definition at line 13 of file DataFactoryTest.php.

Member Function Documentation

◆ setUp()

DataFactoryTest::setUp ( )
protected

Definition at line 15 of file DataFactoryTest.php.

16  {
17  $this->f = new Data\Factory();
18  }

◆ tearDown()

DataFactoryTest::tearDown ( )
protected

Definition at line 20 of file DataFactoryTest.php.

21  {
22  $this->f = null;
23  }

◆ testError()

DataFactoryTest::testError ( )

Definition at line 33 of file DataFactoryTest.php.

References $result.

34  {
35  $result = $this->f->error("Something went wrong");
36  $this->assertInstanceOf(Data\Result::class, $result);
37  $this->assertTrue($result->isError());
38  $this->assertFalse($result->isOk());
39  }
$result

◆ testOk()

DataFactoryTest::testOk ( )

Definition at line 25 of file DataFactoryTest.php.

References $result.

26  {
27  $result = $this->f->ok(3.154);
28  $this->assertInstanceOf(Data\Result::class, $result);
29  $this->assertTrue($result->isOk());
30  $this->assertFalse($result->isError());
31  }
$result

The documentation for this class was generated from the following file: