mirror of
https://github.com/Universal-Omega/PortableInfobox.git
synced 2024-11-15 11:59:56 +00:00
Merge pull request #7712 from Wikia/DAT-2965
DAT-2965 remove type hinting, to prevent fatal errors
This commit is contained in:
commit
def6be16b8
|
@ -14,7 +14,7 @@ class PortableInfoboxDataService {
|
|||
$this->title = $title;
|
||||
}
|
||||
|
||||
public static function newFromTitle( Title $title ) {
|
||||
public static function newFromTitle( $title ) {
|
||||
return new PortableInfoboxDataService( $title );
|
||||
}
|
||||
|
||||
|
|
|
@ -77,4 +77,16 @@ class PortableInfoboxDataServiceTest extends PHPUnit_Framework_TestCase {
|
|||
$this->assertTrue( in_array( "Test2.jpg", $images ), "Test2.jpg should be in images array" );
|
||||
}
|
||||
|
||||
public function testTitleNullConstructor() {
|
||||
$service = PortableInfoboxDataService::newFromTitle(null);
|
||||
$result = $service->getData();
|
||||
$this->assertEquals( [], $result );
|
||||
}
|
||||
|
||||
public function testConstructor() {
|
||||
$service = PortableInfoboxDataService::newFromPageID(null);
|
||||
$result = $service->getData();
|
||||
$this->assertEquals( [], $result );
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue