Annotation of embedaddon/php/ext/spl/tests/SplFileInfo_getExtension_basic.phpt, revision 1.1

1.1     ! misho       1: --TEST--
        !             2: SPL: SplFileInfo::getExtension() basic test
        !             3: --FILE--
        !             4: <?php
        !             5: $file = md5('SplFileInfo::getExtension');
        !             6: $exts = array('.txt', '.extension', '..', '.', '');
        !             7: foreach ($exts as $ext) {
        !             8:     touch($file . $ext);
        !             9:     $info = new SplFileInfo($file . $ext);
        !            10:     var_dump($info->getExtension(), pathinfo($file . $ext, PATHINFO_EXTENSION));
        !            11: }
        !            12: ?>
        !            13: --CLEAN--
        !            14: <?php
        !            15: $file = md5('SplFileInfo::getExtension');
        !            16: $exts = array('.txt', '.extension', '..', '.', '');
        !            17: foreach ($exts as $ext) {
        !            18:     unlink($file . $ext);
        !            19: }
        !            20: ?>
        !            21: --EXPECTF--
        !            22: string(3) "txt"
        !            23: string(3) "txt"
        !            24: string(9) "extension"
        !            25: string(9) "extension"
        !            26: string(0) ""
        !            27: string(0) ""
        !            28: string(0) ""
        !            29: string(0) ""
        !            30: string(0) ""
        !            31: string(0) ""

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>