mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
FIX: Remove referencies to Object::$class
This property is being deprecated in SS4 and so this removes references to it.
This commit is contained in:
parent
0008f474b8
commit
fe0ca63c7a
@ -196,7 +196,8 @@ class Report extends ViewableData
|
|||||||
{
|
{
|
||||||
$sourceRecords = $this->sourceRecords($params, null, null);
|
$sourceRecords = $this->sourceRecords($params, null, null);
|
||||||
if (!$sourceRecords instanceof SS_List) {
|
if (!$sourceRecords instanceof SS_List) {
|
||||||
user_error($this->class."::sourceRecords does not return an SS_List", E_USER_NOTICE);
|
|
||||||
|
user_error(get_class($this) . "::sourceRecords does not return an SS_List", E_USER_NOTICE);
|
||||||
return "-1";
|
return "-1";
|
||||||
}
|
}
|
||||||
return $sourceRecords->count();
|
return $sourceRecords->count();
|
||||||
|
@ -43,7 +43,7 @@ class SideReportView extends ViewableData
|
|||||||
$columns = $this->report->columns();
|
$columns = $this->report->columns();
|
||||||
|
|
||||||
if ($records && $records->Count()) {
|
if ($records && $records->Count()) {
|
||||||
$result = "<ul class=\"$this->class\">\n";
|
$result = "<ul class=\"" . get_class($this) . "\">\n";
|
||||||
|
|
||||||
foreach ($records as $record) {
|
foreach ($records as $record) {
|
||||||
$result .= "<li>\n";
|
$result .= "<li>\n";
|
||||||
|
@ -31,7 +31,7 @@ class ReportTest extends SapphireTest
|
|||||||
$reports = Report::get_reports();
|
$reports = Report::get_reports();
|
||||||
$reportNames = array();
|
$reportNames = array();
|
||||||
foreach ($reports as $report) {
|
foreach ($reports as $report) {
|
||||||
$reportNames[] = $report->class;
|
$reportNames[] = get_class($report);
|
||||||
}
|
}
|
||||||
$this->assertContains('ReportTest_FakeTest', $reportNames, 'ReportTest_FakeTest is in reports list');
|
$this->assertContains('ReportTest_FakeTest', $reportNames, 'ReportTest_FakeTest is in reports list');
|
||||||
|
|
||||||
@ -41,7 +41,7 @@ class ReportTest extends SapphireTest
|
|||||||
$reports = Report::get_reports();
|
$reports = Report::get_reports();
|
||||||
$reportNames = array();
|
$reportNames = array();
|
||||||
foreach ($reports as $report) {
|
foreach ($reports as $report) {
|
||||||
$reportNames[] = $report->class;
|
$reportNames[] = get_class($report);
|
||||||
}
|
}
|
||||||
$this->assertNotContains('ReportTest_FakeTest', $reportNames, 'ReportTest_FakeTest is NOT in reports list');
|
$this->assertNotContains('ReportTest_FakeTest', $reportNames, 'ReportTest_FakeTest is NOT in reports list');
|
||||||
|
|
||||||
@ -51,7 +51,7 @@ class ReportTest extends SapphireTest
|
|||||||
$reports = Report::get_reports();
|
$reports = Report::get_reports();
|
||||||
$reportNames = array();
|
$reportNames = array();
|
||||||
foreach ($reports as $report) {
|
foreach ($reports as $report) {
|
||||||
$reportNames[] = $report->class;
|
$reportNames[] = get_class($report);
|
||||||
}
|
}
|
||||||
$this->assertNotContains('ReportTest_FakeTest', $reportNames, 'ReportTest_FakeTest is NOT in reports list');
|
$this->assertNotContains('ReportTest_FakeTest', $reportNames, 'ReportTest_FakeTest is NOT in reports list');
|
||||||
$this->assertNotContains('ReportTest_FakeTest2', $reportNames, 'ReportTest_FakeTest2 is NOT in reports list');
|
$this->assertNotContains('ReportTest_FakeTest2', $reportNames, 'ReportTest_FakeTest2 is NOT in reports list');
|
||||||
@ -62,7 +62,7 @@ class ReportTest extends SapphireTest
|
|||||||
$reports = Report::get_reports();
|
$reports = Report::get_reports();
|
||||||
$reportNames = array();
|
$reportNames = array();
|
||||||
foreach ($reports as $report) {
|
foreach ($reports as $report) {
|
||||||
$reportNames[] = $report->class;
|
$reportNames[] = get_class($report);
|
||||||
}
|
}
|
||||||
$this->assertNotContains('ReportTest_FakeTest_Abstract',
|
$this->assertNotContains('ReportTest_FakeTest_Abstract',
|
||||||
$reportNames,
|
$reportNames,
|
||||||
|
Loading…
Reference in New Issue
Block a user