Derick Rethans wrote:
> Please write a new test for this without piggy backing on the old one. 
> We're trying to get one function tested per tests so that differenc 
> functions in the same test can not be the cause of 'screw-ups'.

Ok, I attached a file ext/standard/tests/file/file_put_contents.phpt

- Chris
-- 
IOGRAM AG     | http://iogram.ch
Binzstrasse 7 | 8045 Zürich | Tel. 01 465 45 45
Computers are not intelligent. They only think they are.
--TEST--
file_put_contents() function test
--POST--
--GET--
--FILE--
<?php

$name = tempnam("./ext/standard/tests/file/", "php");
echo file_put_contents($name, "Data to be overwritten\n") . "\n";
readfile($name);

$data = "The quick brown fox jumps over the lazy dog\n";
echo file_put_contents($name, $data) . "\n";
readfile($name);

$data = array("Apples\n", "Oranges\n");
echo file_put_contents($name, $data, "ab") . "\n";
readfile($name);

unlink($name);

?>
--EXPECT--
23
Data to be overwritten
44
The quick brown fox jumps over the lazy dog
15
The quick brown fox jumps over the lazy dog
Apples
Oranges

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to