diff options
| author | Ondřej Surý <ondrej@sury.org> | 2013-07-22 08:22:22 +0200 |
|---|---|---|
| committer | Ondřej Surý <ondrej@sury.org> | 2013-07-22 08:22:22 +0200 |
| commit | d837b4550418036e76d6adb3c7dad94b1e3a5a6a (patch) | |
| tree | 1f1c808039c898d7d891975d3788531a2a6550f1 /ext/spl/tests | |
| parent | 706ac6417162d94eb701952d40df136cd9528b56 (diff) | |
| download | php-d837b4550418036e76d6adb3c7dad94b1e3a5a6a.tar.gz | |
New upstream version 5.5.1+dfsgupstream/5.5.1+dfsg
Diffstat (limited to 'ext/spl/tests')
| -rw-r--r-- | ext/spl/tests/SplFileObject_fgetcsv_delimiter_basic.phpt | 2 | ||||
| -rw-r--r-- | ext/spl/tests/SplFileObject_fgetcsv_delimiter_error.phpt | 2 | ||||
| -rw-r--r-- | ext/spl/tests/SplFileObject_fgetcsv_enclosure_basic.phpt | 2 | ||||
| -rw-r--r-- | ext/spl/tests/SplFileObject_fgetcsv_enclosure_error.phpt | 2 | ||||
| -rw-r--r-- | ext/spl/tests/SplFileObject_fgetcsv_escape_basic.phpt | 2 | ||||
| -rw-r--r-- | ext/spl/tests/SplFileObject_fgetcsv_escape_error.phpt | 2 | ||||
| -rw-r--r-- | ext/spl/tests/SplFileObject_rewind_error001.phpt | 4 | ||||
| -rw-r--r-- | ext/spl/tests/bug61828.phpt | 11 | ||||
| -rw-r--r-- | ext/spl/tests/bug62672.phpt | 31 |
9 files changed, 52 insertions, 6 deletions
diff --git a/ext/spl/tests/SplFileObject_fgetcsv_delimiter_basic.phpt b/ext/spl/tests/SplFileObject_fgetcsv_delimiter_basic.phpt index 32705f091..4402d6ca4 100644 --- a/ext/spl/tests/SplFileObject_fgetcsv_delimiter_basic.phpt +++ b/ext/spl/tests/SplFileObject_fgetcsv_delimiter_basic.phpt @@ -1,5 +1,5 @@ --TEST-- -SplFileObject::fgetcsv with alternative delimeter +SplFileObject::fgetcsv with alternative delimiter --FILE-- <?php $fp = fopen('SplFileObject__fgetcsv.csv', 'w+'); diff --git a/ext/spl/tests/SplFileObject_fgetcsv_delimiter_error.phpt b/ext/spl/tests/SplFileObject_fgetcsv_delimiter_error.phpt index 942c7619d..64d6514a2 100644 --- a/ext/spl/tests/SplFileObject_fgetcsv_delimiter_error.phpt +++ b/ext/spl/tests/SplFileObject_fgetcsv_delimiter_error.phpt @@ -1,5 +1,5 @@ --TEST-- -SplFileObject::fgetcsv with alternative delimeter +SplFileObject::fgetcsv with alternative delimiter --FILE-- <?php $fp = fopen('SplFileObject__fgetcsv.csv', 'w+'); diff --git a/ext/spl/tests/SplFileObject_fgetcsv_enclosure_basic.phpt b/ext/spl/tests/SplFileObject_fgetcsv_enclosure_basic.phpt index ee2497252..efbb5fb68 100644 --- a/ext/spl/tests/SplFileObject_fgetcsv_enclosure_basic.phpt +++ b/ext/spl/tests/SplFileObject_fgetcsv_enclosure_basic.phpt @@ -1,5 +1,5 @@ --TEST-- -SplFileObject::fgetcsv with alternative delimeter +SplFileObject::fgetcsv with alternative delimiter --FILE-- <?php $fp = fopen('SplFileObject__fgetcsv.csv', 'w+'); diff --git a/ext/spl/tests/SplFileObject_fgetcsv_enclosure_error.phpt b/ext/spl/tests/SplFileObject_fgetcsv_enclosure_error.phpt index 5430e5375..7487b8353 100644 --- a/ext/spl/tests/SplFileObject_fgetcsv_enclosure_error.phpt +++ b/ext/spl/tests/SplFileObject_fgetcsv_enclosure_error.phpt @@ -1,5 +1,5 @@ --TEST-- -SplFileObject::fgetcsv with alternative delimeter +SplFileObject::fgetcsv with alternative delimiter --FILE-- <?php $fp = fopen('SplFileObject__fgetcsv.csv', 'w+'); diff --git a/ext/spl/tests/SplFileObject_fgetcsv_escape_basic.phpt b/ext/spl/tests/SplFileObject_fgetcsv_escape_basic.phpt index 96c029095..1a94532b2 100644 --- a/ext/spl/tests/SplFileObject_fgetcsv_escape_basic.phpt +++ b/ext/spl/tests/SplFileObject_fgetcsv_escape_basic.phpt @@ -1,5 +1,5 @@ --TEST-- -SplFileObject::fgetcsv with alternative delimeter +SplFileObject::fgetcsv with alternative delimiter --FILE-- <?php $fp = fopen('SplFileObject__fgetcsv.csv', 'w+'); diff --git a/ext/spl/tests/SplFileObject_fgetcsv_escape_error.phpt b/ext/spl/tests/SplFileObject_fgetcsv_escape_error.phpt index a57031899..fd90103bf 100644 --- a/ext/spl/tests/SplFileObject_fgetcsv_escape_error.phpt +++ b/ext/spl/tests/SplFileObject_fgetcsv_escape_error.phpt @@ -1,5 +1,5 @@ --TEST-- -SplFileObject::fgetcsv with alternative delimeter +SplFileObject::fgetcsv with alternative delimiter --FILE-- <?php $fp = fopen('SplFileObject__fgetcsv.csv', 'w+'); diff --git a/ext/spl/tests/SplFileObject_rewind_error001.phpt b/ext/spl/tests/SplFileObject_rewind_error001.phpt index bdb3301e6..ac536a0a4 100644 --- a/ext/spl/tests/SplFileObject_rewind_error001.phpt +++ b/ext/spl/tests/SplFileObject_rewind_error001.phpt @@ -14,5 +14,9 @@ $fo = new SplFileObject('testdata.csv'); $fo->rewind( "invalid" ); ?> +--CLEAN-- +<?php +unlink('testdata.csv'); +?> --EXPECTF-- Warning: SplFileObject::rewind() expects exactly 0 parameters, 1 given in %s on line %d diff --git a/ext/spl/tests/bug61828.phpt b/ext/spl/tests/bug61828.phpt new file mode 100644 index 000000000..04d435e6d --- /dev/null +++ b/ext/spl/tests/bug61828.phpt @@ -0,0 +1,11 @@ +--TEST-- +Bug #61828 (Memleak when calling Directory(Recursive)Iterator/Spl(Temp)FileObject ctor twice) +--FILE-- +<?php +$x = new DirectoryIterator('.'); +$x->__construct('/tmp'); +echo "Okey"; +?> +--EXPECTF-- +Warning: DirectoryIterator::__construct(): Directory object is already initialized in %sbug61828.php on line 3 +Okey diff --git a/ext/spl/tests/bug62672.phpt b/ext/spl/tests/bug62672.phpt new file mode 100644 index 000000000..d0d6a6245 --- /dev/null +++ b/ext/spl/tests/bug62672.phpt @@ -0,0 +1,31 @@ +--TEST-- +Bug #62672 (Error on serialize of ArrayObject) +--FILE-- +<?php + +class ObjA +{ + private $_varA; + + public function __construct(Iterator $source) + { + $this->_varA = $source; + } +} + +class ObjB extends ObjA +{ + private $_varB; + + public function __construct(ArrayObject $keys) + { + $this->_varB = $keys; + parent::__construct($keys->getIterator()); + } +} + +$obj = new ObjB(new ArrayObject()); + +var_dump($obj == unserialize(serialize($obj))); +--EXPECTF-- +bool(true) |
