mirror of
https://github.com/silverstripe/silverstripe-dms
synced 2024-10-22 14:05:56 +02:00
More DB quoting
This commit is contained in:
parent
ebcd6caa26
commit
f7e4e279ee
@ -93,7 +93,7 @@ class DMSDocumentTest extends SapphireTest {
|
||||
|
||||
$s1->delete();
|
||||
|
||||
$documents = DataObject::get("DMSDocument","Filename = 'delete test file'", false);
|
||||
$documents = DataObject::get("DMSDocument","\"Filename\" = 'delete test file'", false);
|
||||
$this->assertEquals(
|
||||
$documents->Count(),
|
||||
'1',
|
||||
@ -101,7 +101,7 @@ class DMSDocumentTest extends SapphireTest {
|
||||
);
|
||||
|
||||
$s2->delete();
|
||||
$documents = DataObject::get("DMSDocument","Filename = 'delete test file'");
|
||||
$documents = DataObject::get("DMSDocument","\"Filename\" = 'delete test file'");
|
||||
$this->assertEquals(
|
||||
$documents->Count(),
|
||||
'1',
|
||||
@ -111,7 +111,7 @@ class DMSDocumentTest extends SapphireTest {
|
||||
|
||||
$s2 = Versioned::get_one_by_stage('SiteTree', 'Live', sprintf('"SiteTree"."ID" = %d', $s2ID));
|
||||
$s2->doDeleteFromLive();
|
||||
$documents = DataObject::get("DMSDocument","Filename = 'delete test file'");
|
||||
$documents = DataObject::get("DMSDocument","\"Filename\" = 'delete test file'");
|
||||
$this->assertEquals(
|
||||
$documents->Count(),
|
||||
'0',
|
||||
@ -133,7 +133,7 @@ class DMSDocumentTest extends SapphireTest {
|
||||
$doc->addPage($s2);
|
||||
|
||||
$s2->doDeleteFromLive();
|
||||
$documents = DataObject::get("DMSDocument","Filename = 'delete test file'");
|
||||
$documents = DataObject::get("DMSDocument","\"Filename\" = 'delete test file'");
|
||||
$this->assertEquals(
|
||||
$documents->Count(),
|
||||
'1',
|
||||
@ -143,7 +143,7 @@ class DMSDocumentTest extends SapphireTest {
|
||||
|
||||
$s2 = Versioned::get_one_by_stage('SiteTree', 'Stage', sprintf('"SiteTree"."ID" = %d', $s2ID));
|
||||
$s2->delete();
|
||||
$documents = DataObject::get("DMSDocument","Filename = 'delete test file'");
|
||||
$documents = DataObject::get("DMSDocument","\"Filename\" = 'delete test file'");
|
||||
$this->assertEquals(
|
||||
$documents->Count(),
|
||||
'0',
|
||||
|
Loading…
Reference in New Issue
Block a user