473,503 Members | 10,660 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Is there script for testing any kind of a php file?

50 New Member
hi

I wanted to develop php unit file testing. Like showing each php file with "test" link (or button).When we click the "test" associated to that file it dispay the output. plz help
Nov 17 '10 #1
9 1428
code green
1,726 Recognized Expert Top Contributor
I may be missing something but I would say no.
The reason being it is a pointless exercise
unless all your php code,html DAL etc is bundled into one file.

And that is poor programming style
Nov 17 '10 #2
sidhx
50 New Member
OK but is it possible to get xml content from the php file which has xml inside the php, while testing
Nov 18 '10 #3
code green
1,726 Recognized Expert Top Contributor
This again sounds like poor practice.
Why would you have XML buried in PHP code?
If you are reading or writing XML then ideally you should be using DOM or simpleXML.
OK, I can understand writing XML as a string, interspersed with variables.
Are you are tring to test this for valid XML?
Nov 18 '10 #4
sidhx
50 New Member
Are you are tring to test this for valid XML?
yes
Nov 18 '10 #5
kovik
1,044 Recognized Expert Top Contributor
It may be more useful if you give us an example of what you are trying to accomplish. There is no general way to "just test" in PHP.
Nov 18 '10 #6
code green
1,726 Recognized Expert Top Contributor
I would write the string variable to a text file using file_put_contents(), saving the file as .xml.
Then the operation becomes validating an XML for being well formed.
Nov 18 '10 #7
sidhx
50 New Member
i would like check the php files by sending details to respective file like post and get method type with only one click associated to that files.

ex:
authenticate.php----TEST
gameStatus.php----TEST and soon
Nov 22 '10 #8
kovik
1,044 Recognized Expert Top Contributor
You can utilize cURL to simulate POST and GET requests.
Nov 22 '10 #9
sidhx
50 New Member
Thanks for all cya
Nov 23 '10 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

8
6551
by: Radioactive Man | last post by:
I am fairly new to the latest verion of Python and using it on windows 95, 2000, and/or XP. What libraries, modules, functions, etc. would I need to set up a Python script to download a file, say...
1
5500
by: Avin Patel | last post by:
Hi, I am looking for script to allow multiple files can be uploaded/attached in webform ( mostly cgi/perl or php). But I don't like the multiple input boxes using "<input type="file" size="40"...
7
2375
by: BOOGIEMAN | last post by:
How can I test PHP scripts, mods & forums (phpBB) on my PC ? I'm affraid it's little more complicated than only instaling PHP, than, I would probably need to install mySQL ... and so on ... Is...
10
3124
by: EnjoyNews | last post by:
I have a php site I have an include line called "include 'Cookie.php';" In this Cookie.php file I have these codes. <?php $conn = mysql_connect("$db", "$user", "$pass");...
0
1119
by: brozanic | last post by:
Does anyone have a script or bat file to uninstall Access97?
3
1231
by: Andrew Robert | last post by:
Hi Everyone, Is there a way to test if a file is binary or ascii within Python? I'd prefer not to text against file extension. Any help you can provide would be greatly appreciated. ...
1
4744
by: Osoccer | last post by:
...to a different folder and in the relocated file concatenates all of the lines in one long string with a space between each line element. Here is a fuller statement of the problem: I need a...
7
4583
by: Ed Jay | last post by:
I'm trying to validate a form's file input elements using javascript, but I'm getting nowhere. How can javascript test if a file has been selected using a file form input element? -- Ed Jay...
3
1339
by: Denize | last post by:
I am creating a script that may check if a field has a non character and if yes it may appears an error message after I move to the next field. When I use this script in PL/SQL (...v_enabled||'...
5
1700
by: ramanagosu | last post by:
Hi, I am new to php please give me an idea how to manage video script in css file using php cheers Ramana.
0
7207
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7095
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7294
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7361
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
5026
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4693
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3183
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3173
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1523
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.