Revision: test and fix __construct exceptions
authoraddshore <addshorewiki@gmail.com>
Wed, 11 Oct 2017 12:40:03 +0000 (13:40 +0100)
committerLegoktm <legoktm@member.fsf.org>
Thu, 12 Oct 2017 01:07:21 +0000 (01:07 +0000)
commit288fb8cafaa14e5bacda9316536f36fe4425b8a4
treea6db9b5e5d529db0654437be3a021bebcba78c33
parentc94ffdd2f901df2b39b44b25a4985102b2e2df98
Revision: test and fix __construct exceptions

This adds tests for each exception that can be thrown
in the Revision constructor.
It also fixes where the exception for the content part of a row
not containing a content object is thrown.
Prior to this ->getModel() could be called on the content row
element before the check had actually occoured.

Change-Id: Ia2d2cfdca01871fc6dbb96707d781db33d7d0a40
includes/Revision.php
tests/phpunit/includes/RevisionTest.php