Drupal lets you add a taxonomy term to a node and if you use the GUI you can have a nice auto-complete widget that takes term name - and iof the term doesn’t exist yet you get a new term created when you save the node.
I wanted to access the same functionality on node I am generating from external data.
While playing around with selenium IDE I discovered a fantatsic tool that makes test (and results) more readable while making the suite of tests easier to adapt to layout changes.
What it does is to allow you to centrally define most of the xpath (and related) statements and give page elements meaningful names.
Hudson http://hudson-ci.org/ is a continuous integration server - it runs and monitors ‘jobs’ in a way that is useful to regularly build software and report on any errors.
Selenium http://seleniumhq.org/ is a suite of tools specifically for testing web
applications - it tests the full website by automating the running of one or more browsers (so you can test all that pointy clicky ajaxy stuff)
<?php$result=db_query("SELECT nid FROM node where type='mytype'");while($row=db_fetch_object($result)){node_delete($row->nid);}node_type_delete('mytype');?>
We had an old Drupal module which contained exported views, most of our sites uses features to manage view - so when they needed updating we wanted to use features.
So we deleted the old module and added a new one with the required views.
For those who haven’t read it, http://buytaert.net/8-steps-for-drupal-8 is worth a read. In it, step 6 is “Backport small changes to stable releases”. Drupal 7 is the first release we’ve been able to entertain the idea, since we have a testing framework with 25K tests and a version-specific dependency system. What the boundaries are of such changes isn’t quite defined yet, because Dries and I have kept pretty busy with, you know, getting Drupal 7 out the door. :P~
Reading Greg’s post on security upgrades and a few mentions of patches in the following discussion got me thinking about upgrade methods.
The standard Drupal method is to delete existing files and unpack a tarball to replace the old version - I find this method unappealing because: I keep my code in subversion so don’t want to delete the .svn subdirectories, and sometimes I have patches applied that I don’t want to loose.
I’ve found altering CCK node types as part of a fully scripted deployment phase to be quite challenging.
The best I’ve come up with is to use features for the main config changes and adding fields, but this won’t remove any fields - but CCK provides functions for this.