Skip to content

Commit 56d6b40

Browse files
author
Cully Larson
committed
Updated the tests to check the return value of sync.
1 parent d136067 commit 56d6b40

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

tests/Wordpress/Deploy/SyncTest.php

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,9 @@ public function testSync() {
8686
$dest = $this->folders['dest'];
8787

8888
$folderSync = new FolderSync($source, $dest);
89-
$folderSync->sync();
89+
$success = $folderSync->sync();
90+
91+
$this->assertTrue($success);
9092

9193
// all of the source and shared files should be in the destination
9294
$sourceFilesMerged = array_merge($this->sourceFiles, $this->sharedFiles);
@@ -111,7 +113,9 @@ public function testExclude() {
111113
$dest = $this->folders['dest'];
112114

113115
$folderSync = new FolderSync($source, $dest, ['exclude' => $exclude]);
114-
$folderSync->sync();
116+
$success = $folderSync->sync();
117+
118+
$this->assertTrue($success);
115119

116120
// the excluded files should not be at the destination
117121
foreach($exclude as $filename) {
@@ -132,7 +136,9 @@ public function testStatusCallback() {
132136
$dest = $this->folders['dest'];
133137

134138
$folderSync = new FolderSync($source, $dest);
135-
$folderSync->sync($statusCallback);
139+
$success = $folderSync->sync($statusCallback);
140+
141+
$this->assertTrue($success);
136142

137143
$this->assertTrue($statusWasCalled);
138144
}
@@ -142,7 +148,9 @@ public function testNoDelete() {
142148
$dest = $this->folders['dest'];
143149

144150
$folderSync = new FolderSync($source, $dest, ['delete' => false]);
145-
$folderSync->sync();
151+
$success = $folderSync->sync();
152+
153+
$this->assertTrue($success);
146154

147155
// all of the source, dest, and shared files should be in the destination
148156
$sourceFilesMerged = array_merge($this->sourceFiles, $this->sharedFiles, $this->destFiles);

0 commit comments

Comments
 (0)