add test strtotime-parse-dates
This commit is contained in:
parent
23e661e435
commit
24d746dd12
3 changed files with 93 additions and 0 deletions
15
integration/strtotime-parse-dates/TC#0068513.fmf
Normal file
15
integration/strtotime-parse-dates/TC#0068513.fmf
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
contact: None <icesalov@redhat.com>
|
||||
component:
|
||||
- php
|
||||
tag:
|
||||
- NoModularTier
|
||||
- NoRHEL3
|
||||
- NoRHEL4
|
||||
- TIPpass_Apps
|
||||
- Tier2
|
||||
relevancy: |
|
||||
distro = rhel-3, rhel-4: False
|
||||
extra-nitrate: TC#0068513
|
||||
extra-summary: /CoreOS/php/Regression/bz444425-strtotime
|
||||
extra-pepa: |
|
||||
PACKAGES='php-cli' component/php
|
||||
25
integration/strtotime-parse-dates/main.fmf
Normal file
25
integration/strtotime-parse-dates/main.fmf
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
summary: PHP bug 37514 strtotime to parse dates with out specifying a year
|
||||
description: |
|
||||
Test Name: bz444425-strtotime - Bugzilla(s) 444425
|
||||
Author: Martin Koci (koca) <mkoci@redhat.com>
|
||||
Location: /CoreOS/php/Regression/bz444425-strtotime
|
||||
|
||||
Short Description: PHP bug 37514 strtotime to parse dates with out specifying a year
|
||||
|
||||
|
||||
Long Description:
|
||||
|
||||
When using strtotime to parse dates if an 'am' or 'pm' is added without specifying a year, dates returned are not proper
|
||||
contact:
|
||||
- Iveta Cesalova <icesalov@redhat.com>
|
||||
component:
|
||||
- php
|
||||
test: ./runtest.sh
|
||||
framework: beakerlib
|
||||
recommend:
|
||||
- php
|
||||
duration: 5m
|
||||
enabled: true
|
||||
tier: '2'
|
||||
extra-summary: /CoreOS/php/Regression/bz444425-strtotime
|
||||
extra-task: /CoreOS/php/Regression/bz444425-strtotime
|
||||
53
integration/strtotime-parse-dates/runtest.sh
Executable file
53
integration/strtotime-parse-dates/runtest.sh
Executable file
|
|
@ -0,0 +1,53 @@
|
|||
# runtest.sh - bz444425-strtotime - Bugzilla(s) 444425
|
||||
# Author: Martin Koci (koca) <mkoci@redhat.com>
|
||||
# Location: /CoreOS/php/Regression/bz444425-strtotime/runtest.sh
|
||||
|
||||
# Description: PHP bug 37514 strtotime to parse dates with out specifying a year
|
||||
|
||||
# Copyright (c) 2008 Red Hat, Inc. All rights reserved. This copyrighted material
|
||||
# is made available to anyone wishing to use, modify, copy, or
|
||||
# redistribute it subject to the terms and conditions of the GNU General
|
||||
# Public License v.2.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
|
||||
PACKAGES="${PACKAGES:-php-cli}"
|
||||
|
||||
# Include Beaker environment
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
|
||||
rlStartJournal
|
||||
|
||||
######################
|
||||
# Prepare environment
|
||||
######################
|
||||
rlPhaseStartSetup Preparation
|
||||
rlAssertRpm --all
|
||||
rlAssertBinaryOrigin "php"
|
||||
rlRun "php -v"
|
||||
rlPhaseEnd
|
||||
|
||||
######################
|
||||
# Begin Test-Case
|
||||
######################
|
||||
rlPhaseStartTest Test
|
||||
rlRun "php -r 'echo date(\"r\", strtotime(\"May 18th 5:05pm\"));'|egrep '1969|1970'" 1
|
||||
rlRun "php -r 'echo date(\"r\", strtotime(\"May 18th 5:05 pm\"));'|egrep '1969|1970'" 1
|
||||
rlPhaseEnd
|
||||
|
||||
######################
|
||||
# Clean after the test
|
||||
######################
|
||||
rlPhaseStartCleanup Clean-Up
|
||||
#rlBundleLogs logs file.log another-file.log
|
||||
rlCreateLogFromJournal > ${OUTPUTFILE}
|
||||
rlPhaseEnd
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue