Skip to content

Commit 2ab6dd4

Browse files
committed
Test create file
1 parent a17abb1 commit 2ab6dd4

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

tests/Adapters/FileTest.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,17 @@ public function testRemove(LoopInterface $loop, FilesystemInterface $filesystem)
106106
$this->assertFalse(file_exists($tempFile));
107107
}
108108

109+
/**
110+
* @dataProvider filesystemProvider
111+
*/
112+
public function testCreate(LoopInterface $loop, FilesystemInterface $filesystem)
113+
{
114+
$tempFile = $this->tmpDir . uniqid('', true);
115+
$this->assertFileNotExists($tempFile);
116+
$this->await($filesystem->file($tempFile)->create(), $loop);
117+
$this->assertFileExists($tempFile);
118+
}
119+
109120
/**
110121
* @dataProvider filesystemProvider
111122
*/
@@ -233,6 +244,7 @@ public function testRename(LoopInterface $loop, FilesystemInterface $filesystem)
233244
$this->assertFileExists($tempFileTo);
234245
$this->assertSame($filenameFrom, file_get_contents($tempFileTo));
235246
}
247+
236248
/**
237249
* @dataProvider filesystemProvider
238250
*/

0 commit comments

Comments
 (0)