phpUnit Test Software

None of the above.

I’m an ex-ASP developer (1994-2001) who’s been driving semis for 15 years and wanting to transition back to web dev.

Not a CompSci student. (Went to college for Chiropractic Medicine. Dropped out after 1 year w a 3.9gpa because I wanted to get married, but I couldn’t be married while attending college.)

I know several classic, unused languages. I don’t know too many folks hiring VBScript coders.

As for WHY unit testing… Test Driven Development (TDD). Write your tests BEFORE you write your code.

My major portfolio project is a Yard Management System targeting my current employer which has none. It will also require websockets to keep all users synchronized, but that looks fairly simple.

While chance of sale to them is very low (skin flints), it’d still look awesome on my portfolio site along w recreations of my legacy projects, ported to php instead of their original ASP/ SQLServer on corporate Intranets.

That was part of the doom of my earlier career: no portfolio. My projects were always behind firewalls, on intranets, unviewable to the public. So long as those companies and departments existed, new employers could talk about it w them and confirm my resume was true.

Then in 2001, NASDAQ crashed. The Twin Towers meant little to me. NASDAQ hurt more.

Within 2 weeks, every contract company I had ever worked for, every IT dept I ever worked w, every manager who ever knew me, disappeared and every future contract dried up. I could barely get interviews. I would code circles around my competition (literally half the code written [25 vs 54] lines in half the time [20 vs 49 min]), but he got the job w an existing Internet site while my resume was unprovable. Final straw: ordering my mocha at the local coffee shop from my former project manager. She had fallen from $300k/yr salary to tips.

Still had wife and kids to feed.
Paid training to drive a truck and swing hammers in the oil field for the next 10 years of my life.

1 Like

Man… you just blew away 30 minutes of my life!

I had great sarcastic responses for your post before your last and now, after reading this one, I don’t want to paste them here any more.

I’m just going to paste the non sarcastic ones.

They have click to install buttons on THIS server. Because somebody made “Click to Install” buttons for these softwares and the owners of these servers bought that solution. Not from the team that makes Wordpress or Joomla, but from the team that made the “Click to Install” buttons.

Go to the Wordpress official website and see their install instructions. There is no “Click to Install” button!
Do the same for Joomla or any other software that has “Click to Install” buttons on InfinityFree. None of them has a “Click to Install” button.

You’re wrong. Wordpress is open source. You can change everything. You don’t even need their backend functionality. You can write your own backend for Wordpress or use it without a backend. It would beat the purpose though.

Tell me about it! My father is a genius and I give free help on hosting forums.

1 Like

My last paid project was as a contractor in Tampa for Verizon: Sep 2000 - Mar 2001. They had just formed via the merger of GTE & Bell Atlantic. As in most mergers, a strong “us vs them” mentality dominated: GTE vs Bell Atlantic. Since most of the head honchos were GTE, they tended to win.

My project was to turn an AccessDB from 1 office w 10 users to corporate-wide w hundreds. I worked my heart out. I was so attentive to my contact that I got a “customer service award” (GTE, of course). In the course of the project, I needed to connect ASP to the AccessDB to port all their data. No can do. I wrote a dll in VB6 to handle the read connections from Access then the regular SQLServer dbconn to handle the write. Apparently, that dll was in high demand. I had 4 other projects in the office that needed it. They submitted additional flexibility needs while I wrote it.

On Wednesday, my main customer told me that our project was getting superceded by a GTE developed system out of Texas vs her Bell Atlantic system out of Maryland. On Thursday, they mey me in the lobby, told me that my contract was canceled, and gave me my stutf in a cardboard box. Luckily I had been anticipating this. My motorcycle couldn’t’ve carried it all.

[quote]
They have click to install buttons on THIS server. Because somebody made “Click to Install” buttons for these softwares and the owners of these servers bought that solution. Not from the team that makes Wordpress or Joomla, but from the team that made the “Click to Install” buttons.

Go to the Wordpress official website and see their install instructions. There is no “Click to Install” button![/quote]
They almost have one.
Per ~How to install WordPress – Advanced Administration Handbook | Developer.WordPress.org
“WordPress is well-known for its ease of installation. Under most circumstances, installing WordPress is a very simple process and takes less than five minutes to complete. Many web hosts now offer tools (e.g. Fantastico) to automatically install WordPress for you. However, if you wish to install WordPress yourself, the following guide will help…”

I only know of Drupal & Joomla because they’re on that same list of installable apps.

No, I’m not. What I said was “via the Wordpress control panel”. I know how it works because I installed it once then dissected all the files. I wanted to see how it was different than my cms. Since I didn’t know php at the time, it was a struggle, but some things were obvious.

I don’t dispute that. At what point would it no longer be Wordpress?

The guy w the highest IQ is a farmer in Kansas.
I was accepted into MENSA, but I couldn’t afford their monthly dues.

BTW, I was NOT being sarcastic about MarkZ being the evil Emperor.

While pleasant, this isn’t getting me any closer to installing or using PHPunit.

The short answer to your question is: there is no fast and easy way to use PhpUnit. No one click to install button.

WordPress does have that, but WordPress is a CMS that is supposed to be easy to install and use by people without programming experience. By the time you’re touching PHP, you’ll need far more base knowledge for that.

But it does help that you’re familiar with software engineering, because makes this all a bit easier to put in context. I didn’t realize you were familiar with unit testing and TDD.

The first thing to realize is that PHP is a bit of a weird language. It’s mainly designed as web-first spaghetti script and everything else was pulled in afterwards. Unlike with many other languages, testability is not part of it’s core, and there is a lot of boilerplate you’ll need to make it testable.

With that in mind, if you’re going to develop a PHP application and want TDD, I would highly recommend to use a modern web framework that supports this out of the box. Laravel is probably the most popular framework nowadays, and for good reason.

Laravel not only comes with a ton of features and good practices, it also includes PhpUnit and they have a recommended development setup for Windows. They also have great documentation, so it’s pretty much a one stop shop for building a modern web application in PHP.

That doesn’t mean you have to use it though. You can use a different framework or not run a framework altogether. But I have no idea how you would integrate PhpUnit into that. It’s probably possible, but the work needed for that goes way beyond the scope of what you can reasonably expect someone to explain to you in a forum post.

2 Likes

In truth, I’m not “familiar” w it. I know it exists and that PHPUnit is how to do it. Just like everything else, this is learn by doing.

Since 1) Laravel is frequently requested in various job postings, 2) I was planning to use Laravel anyway, and 3) I’ve already installed it on my IF account, this is an acceptable compromise.

So you said that PHPunit is included w Laravel, then u question the ability to integrate them together. Which is it?

The immediate goal here is to perform automated unit testing, not simply to use PHPunit.

Google/Bing/ect. it

phpunit laravel - Bing

Stack Overflow also might be able to help you out a little more than us, but it sounds like you can install PHPUnit while using the Laravel framework.

Per ~~https://laravel.com/docs/8.x/testing~~
“Laravel is built with testing in mind. In fact, support for testing with PHPUnit is included out of the box and a phpunit.xml file is already set up for your application. The framework also ships with convenient helper methods that allow you to expressively test your applications.”

Et cetera.

Apparently, tildes mean something special in this editor.

So it should work than. Give it a shot and let us know what you think.

Yes, if it cannot create a onebox for the link (Or if it is a page within a directory), it will convert your link to the title of the page. You can remove this by simply pasting the link and removing the and other characters that are automaticly inserted around your link.

I’ll try to remember to post something here as an update, but don’t hold your breath. That 30+ days out.

1 Like

I’ll be here :slight_smile:

1 Like

Integrating PhpUnit into a PHP application isn’t easy. But if you use Laravel, then the Laravel developers have taken care of all of that and you can start writing tests right away.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.