Cwgordon7's blog - how to /taxonomy/term/8/0 en How to: Write Automated Tests for Drupal /how-to-write-automated-tests-for-drupal <p>With <a href="">an automated testing framework in core</a>, Drupal is now far along the road to a practice of <a href="">Test-driven development</a>. But there's one thing missing: a complete, in-depth, up-to-date tutorial on how to actually <strong>write</strong> these tests. Although there is the <a href="">SimpleTest Automator</a> module to help you create these tests through the user interface, it is currently imperfect and under development, so this post will be a tutorial on writing these tests manually.</p> <h2>Testing resources</h2> <p>Here's just a general list of resources we should keep handy while writing our test:</p> <ul> <li><a href="">Testing API functions</a> - This is a quick cheat sheet of some functions that are very helpful during testing. These include controlling the internal testing browser, creating users with specific permissions, and simulating clicking on links that appear in the page.</li> <li><a href="">Available assertions</a> - Assertions are how you determine whether your code is working or not - you assert that it <strong>should</strong> be working, and let the testing framework handle the rest for you. This is a library on the assertions that are available to use in our testing framework.</li> </ul> <p><a href="/how-to-write-automated-tests-for-drupal" target="_blank">read more</a></p> /how-to-write-automated-tests-for-drupal#comments drupal how to simpletest Mon, 14 Jul 2008 06:02:47 +0000 cwgordon7 17 at How to: create a wiki with Drupal /how-to-create-a-wiki-with-drupal <p>Over the past two years, Drupal's wiki capabilities have expanded exponentially. Yet, still we get support requests on the forums, "How can I make a wiki with Drupal?" Well, here is a detailed plan that gives wiki functionality to Drupal. This tutorial assumes you're starting with an installed version of Drupal 5.x, and that you're familiar with installing modules.</p> <h2>Absolute Wiki Essentials:</h2> <ol> <li><strong>Step 1: Allow for categorization of wiki pages.</strong> <p>There is often this request: I want to be able to categorize my wiki pages into a hierarchy. Well, with Drupal core's book module, you can do just that! First, <strong>enable the book module</strong>. Then, go to the admin/content/types page to view your content types. <strong>Delete</strong> any content types you don't want. Then, <strong>rename</strong> the "Book page" content type to "Wiki page" or something similar. Also, in the "workflow" fieldset, make sure to check the "create new revision" checkbox. This will make it so that, by default, every edit of a page is done in a revision. </li> <p><a href="/how-to-create-a-wiki-with-drupal" target="_blank">read more</a></p> /how-to-create-a-wiki-with-drupal#comments drupal how to wiki Fri, 28 Dec 2007 01:33:02 +0000 cwgordon7 6 at