Skip to content

Commit 5e962c9

Browse files
committed
fixed slashs term
1 parent 0ad06d6 commit 5e962c9

File tree

3 files changed

+2
-11
lines changed

3 files changed

+2
-11
lines changed

src/BackupTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ trait BackupTrait
4040
*/
4141
public function getAbsolutePath($path)
4242
{
43-
return (new Filesystem())->isAbsolutePath($path) ? $path : $this->getTarget() . DS . $path;
43+
return (new Filesystem())->isAbsolutePath($path) ? $path : add_slash_term($this->getTarget()) . $path;
4444
}
4545

4646
/**

tests/TestCase/BackupTraitTest.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -163,15 +163,6 @@ public function testGetExtension()
163163
}
164164
}
165165

166-
/**
167-
* Test for `getTarget()` method
168-
* @test
169-
*/
170-
public function testGetTarget()
171-
{
172-
$this->assertEquals(Configure::read('DatabaseBackup.target'), $this->getTarget());
173-
}
174-
175166
/**
176167
* Test for `getValidCompressions()` method
177168
* @test

tests/TestCase/Utility/BackupExportTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ public function testFilename()
117117
{
118118
$this->BackupExport->filename('backup.sql.bz2');
119119
$this->assertEquals(
120-
$this->BackupExport->getTarget() . DS . 'backup.sql.bz2',
120+
add_slash_term($this->BackupExport->getTarget()) . 'backup.sql.bz2',
121121
$this->getProperty($this->BackupExport, 'filename')
122122
);
123123
$this->assertEquals('bzip2', $this->getProperty($this->BackupExport, 'compression'));

0 commit comments

Comments
 (0)