File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed
Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -153,6 +153,33 @@ public function testSetPassPhrase()
153153
154154 }
155155
156+ /**
157+ * Test ArchiveDir(--archive-dir) is set as environment variable.
158+ *
159+ * @throws \Exception
160+ */
161+ public function testSetArchiveDir ()
162+ {
163+ $ path = '/path/to/archive/dir ' ;
164+ $ this ->duplicity = $ this ->getDuplicityMock (array ('getVersion ' ));
165+ $ this ->duplicity
166+ ->expects ($ this ->any ())
167+ ->method ('getVersion ' )
168+ ->will ($ this ->returnValue ('0.6 ' ));
169+ $ this ->duplicity ->setArchiveDir ($ path );
170+ $ this ->binary
171+ ->expects ($ this ->once ())
172+ ->method ('run ' )
173+ ->with ($ this ->stringContains ('--archive-dir= ' . $ path ))
174+ ->will ($ this ->returnValue (0 ));
175+ $ this ->binary
176+ ->expects ($ this ->once ())
177+ ->method ('getOutput ' )
178+ ->will ($ this ->returnValue (array ('' )));
179+ $ this ->duplicity ->execute ();
180+
181+ }
182+
156183 /**
157184 * @group 1
158185 * @dataProvider getCmdCollectionOutput
You can’t perform that action at this time.
0 commit comments