Added test
This commit is contained in:
parent
62d00d2769
commit
60dfe94331
1 changed files with 14 additions and 0 deletions
14
tests/file_test.php
Normal file
14
tests/file_test.php
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
require 'ncc';
|
||||||
|
import('net.nosial.tempfile');
|
||||||
|
|
||||||
|
$temp = new \TempFile\TempFile('bin');
|
||||||
|
print(sprintf('Tempfile: %s', $temp->getFilepath()) . PHP_EOL);
|
||||||
|
|
||||||
|
file_put_contents($temp, 'Hello, world!');
|
||||||
|
print(sprintf('Filesize: %s', filesize($temp->getFilepath())) . PHP_EOL);
|
||||||
|
|
||||||
|
sleep(10);
|
||||||
|
print('Exiting...' . PHP_EOL);
|
||||||
|
exit(0);
|
Loading…
Add table
Reference in a new issue