);
}
+ /**
+ * @covers Revision::getTitle
+ */
+ public function testGetTitle_fromExistingRevision() {
+ $this->assertTrue(
+ $this->testPage->getTitle()->equals(
+ $this->testPage->getRevision()->getTitle()
+ )
+ );
+ }
+
+ /**
+ * @covers Revision::getTitle
+ */
+ public function testGetTitle_fromRevisionWhichWillLoadTheTitle() {
+ $rev = new Revision( [ 'id' => $this->testPage->getLatest() ] );
+ $this->assertTrue(
+ $this->testPage->getTitle()->equals(
+ $rev->getTitle()
+ )
+ );
+ }
+
+ /**
+ * @covers Revision::getTitle
+ */
+ public function testGetTitle_forBadRevision() {
+ $rev = new Revision( [] );
+ $this->assertNull( $rev->getTitle() );
+ }
+
}