public function testLabels() { $label = md5(rand()); $check = new AlwaysSuccess(); $check->setLabel($label); $this->assertEquals($label, $check->getLabel()); }
public function testSimpleCheck() { $alwaysSuccess = new AlwaysSuccess(); $this->assertNotNull($alwaysSuccess->getLabel()); $this->assertSame($alwaysSuccess->getName(), $alwaysSuccess->getLabel()); $this->assertSame('Always Success', trim($alwaysSuccess->getLabel()), 'Class-deferred label'); $alwaysSuccess->setLabel('foobar'); $this->assertSame('foobar', $alwaysSuccess->getName(), 'Explicitly set label'); $this->assertSame($alwaysSuccess->getName(), $alwaysSuccess->getLabel()); $result = $alwaysSuccess->check(); $this->assertInstanceOf('ZendDiagnostics\\Result\\ResultInterface', $result); $this->assertNotNull($result->getMessage()); }