*/
function __get( $name ) {
if ( $name === 'ok' ) {
- return $this->sv->getOK();
+ return $this->sv->isOK();
} elseif ( $name === 'errors' ) {
return $this->sv->getErrors();
}
$this->assertEquals( $message, $status->getMessage()->getKey() );
}
+ /**
+ *
+ */
+ public function testOkAndErrors() {
+ $status = Status::newGood( 'foo' );
+ $this->assertTrue( $status->ok );
+ $status = Status::newFatal( 'foo', 1, 2 );
+ $this->assertFalse( $status->ok );
+ $this->assertArrayEquals( array( array( 'type' => 'error', 'message' => 'foo', 'params' => array( 1, 2 ) ) ), $status->errors );
+ }
+
/**
* @dataProvider provideSetResult
* @covers Status::setResult