Ejemplo n.º 1
0
 public function testSetters()
 {
     $result = new Success();
     $this->assertSame(null, $result->getMessage());
     $this->assertSame(null, $result->getData());
     $result->setMessage('foo');
     $result->setData('bar');
     $this->assertSame('foo', $result->getMessage());
     $this->assertSame('bar', $result->getData());
 }
Ejemplo n.º 2
0
 public function testBasicTypesData()
 {
     $test = new Success('foo', 'bar');
     $this->assertEquals('foo', $test->getMessage());
     $this->assertEquals('bar', $test->getData());
     $test = new Warning('foo', 'bar');
     $this->assertEquals('foo', $test->getMessage());
     $this->assertEquals('bar', $test->getData());
     $test = new Failure('foo', 'bar');
     $this->assertEquals('foo', $test->getMessage());
     $this->assertEquals('bar', $test->getData());
     $test = new Unknown('foo', 'bar');
     $this->assertEquals('foo', $test->getMessage());
     $this->assertEquals('bar', $test->getData());
 }