mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
MINOR Added test for FilesystemPublisher::__construct() to ensure DataObject::defineMethods() doesn't break, even when FilesystemPublisher is disabled (from r83582)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@90847 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
22aaf67b85
commit
022f15c77b
26
tests/FilesystemPublisherTest.php
Normal file
26
tests/FilesystemPublisherTest.php
Normal file
@ -0,0 +1,26 @@
|
||||
<?php
|
||||
/**
|
||||
* Tests for the {@link FilesystemPublisher} class.
|
||||
*
|
||||
* @package cms
|
||||
* @subpackage tests
|
||||
*/
|
||||
class FilesystemPublisherTest extends SapphireTest {
|
||||
|
||||
/**
|
||||
* Simple test to ensure that FileSystemPublisher::__construct()
|
||||
* has called parent::__construct() by checking the class property.
|
||||
* The class property is set on {@link Object::__construct()} and
|
||||
* this is therefore a good test to ensure it was called.
|
||||
*
|
||||
* If FilesystemPublisher doesn't call parent::__construct() then
|
||||
* it won't be enabled propery because {@link Object::__construct()}
|
||||
* is where extension instances are set up and subsequently used by
|
||||
* {@link DataObject::defineMethods()}.
|
||||
*/
|
||||
function testHasCalledParentConstructor() {
|
||||
$fsp = new FilesystemPublisher('.', '.html');
|
||||
$this->assertEquals($fsp->class, 'FilesystemPublisher');
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user