/[drupal]/contributions/modules/location/tests/cow.test
ViewVC logotype

Diff of /contributions/modules/location/tests/cow.test

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.2.2.3, Wed Jul 29 19:26:45 2009 UTC revision 1.2.2.4, Thu Jul 30 20:58:43 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: cow.test,v 1.2.2.2 2009/02/25 18:49:31 bdragon Exp $  // $Id: cow.test,v 1.2.2.3 2009/07/29 19:26:45 bdragon Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 9  Line 9 
9  require_once drupal_get_path('module', 'location') . '/tests/location_testcase.php';  require_once drupal_get_path('module', 'location') . '/tests/location_testcase.php';
10    
11  class CowInstanceTest extends LocationTestCase {  class CowInstanceTest extends LocationTestCase {
12      /**
13       * A global administrative user.
14       */
15      var $admin_user;
16    
17      /**
18       * A global normal user.
19       */
20      var $normal_user;
21    
22      /**
23       * Simple content type using defaults.
24       */
25      var $content_type;
26    
27    
28    function getInfo() {    function getInfo() {
29      return array(      return array(
30        'name' => t('Location Copy on Write checks'),        'name' => t('Location Copy on Write checks'),
# Line 238  class CowInstanceTest extends LocationTe Line 254  class CowInstanceTest extends LocationTe
254    
255    function testCOWConservation() {    function testCOWConservation() {
256      $settings = array();      $settings = array();
257      $location_type = $this->addLocationContentType($settings, array('multiple' => array('max' => 3, 'add' => 3)));      $location_type = $this->addLocationContentType($settings);
258    
259      $location1_name = $this->randomName();      $location1_name = $this->randomName();
260    
261      $node = $this->drupalCreateNode(array(      $node = $this->drupalCreateNode(array(
262        'type' => $location_type,        'type' => $location_type,
263        'locations' => array(        'locations' => array(
264          0 => array( // First          0 => array(
265            'name' => $location1_name,            'name' => $location1_name,
266            'location_settings' => $settings,            'location_settings' => $settings,
267          ),          ),
# Line 257  class CowInstanceTest extends LocationTe Line 273  class CowInstanceTest extends LocationTe
273    
274      $changes = array(      $changes = array(
275        'locations' => array(        'locations' => array(
276          0 => array( // Delete First          0 => array(
277              // Update name.
278            'name' => $location1_name .'_CHANGE',            'name' => $location1_name .'_CHANGE',
279          ),          ),
280        ),        ),

Legend:
Removed from v.1.2.2.3  
changed lines
  Added in v.1.2.2.4

  ViewVC Help
Powered by ViewVC 1.1.2