Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

prophet::test(3pm) [debian man page]

Prophet::Test(3pm)					User Contributed Perl Documentation					Prophet::Test(3pm)

   set_editor($code)
       Sets the subroutine that Prophet should use instead of "Prophet::CLI::Command::edit_text" (as this routine invokes an interactive editor)
       to $code.

   set_editor_script SCRIPT
       Sets the editor that Proc::InvokeEditor uses.

       This should be a non-interactive script found in t/scripts.

   import_extra($class, $args)
   in_gladiator($code)
       Run the given code using Devel::Gladiator.

   repo_path_for($username)
       Returns a path on disk for where $username's replica is stored.

   repo_uri_for($username)
       Returns a file:// URI for $USERNAME'S replica (with the correct replica type prefix).

   replica_uuid
       Returns the UUID of the test replica.

   database_uuid
       Returns the UUID of the test database.

   replica_last_rev
       Returns the sequence number of the last change in the test replica.

   as_user($username, $coderef)
       Run this code block as $username.  This routine sets up the %ENV hash so that when we go looking for a repository, we get the user's repo.

   replica_uuid_for($username)
       Returns the UUID of the given user's test replica.

   database_uuid_for($username)
       Returns the UUID of the given user's test database.

   ok_added_revisions( { CODE }, $numbers_of_new_revisions, $msg)
       Checks that the given code block adds the given number of changes to the test replica. $msg is optional and will be printed with the test
       if given.

   serialize_conflict($conflict_obj)
       Returns a simple, serialized version of a Prophet::Conflict object suitable for comparison in tests.

       The serialized version is a hash reference containing the following keys:
	   meta => { original_source_uuid => 'source_replica_uuid' }
	   records => { 'record_uuid' =>
			  { change_type => 'type',
			    props => { propchange_name => { source_old => 'old_val',
							    source_new => 'new_val',
							    target_old => 'target_val',
							  }
				     }
			  },
			'another_record_uuid' =>
			  { change_type => 'type',
			    props => { propchange_name => { source_old => 'old_val',
							    source_new => 'new_val',
							    target_old => 'target_val',
							  }
				     }
			  },
		      }

   serialize_changeset($changeset_obj)
       Returns a simple, serialized version of a Prophet::ChangeSet object suitable for comparison in tests (a hash).

   run_command($command, @args)
       Run the given command with (optionally) the given args using a new Prophet::CLI object. Returns the standard output of that command in
       scalar form or, in array context, the STDOUT in scalar form *and* the STDERR in scalar form.

       Examples:

	   run_command('create', '--type=Foo');

   load_record($type, $uuid)
       Loads and returns a record object for the record with the given type and uuid.

   as_alice CODE, as_bob CODE, as_charlie CODE, as_david CODE
       Runs CODE as alice, bob, charlie or david.

perl v5.10.1							    2009-09-02							Prophet::Test(3pm)

Check Out this Related Man Page

Prophet::ChangeSet(3pm) 				User Contributed Perl Documentation				   Prophet::ChangeSet(3pm)

NAME
Prophet::ChangeSet DESCRIPTION
This class represents a single, atomic Prophet database update. It tracks some metadata about the changeset itself and contains a list of Prophet::Change entries which describe the actual records created, updated and deleted. METHODS
new Instantiate a new, empty Prophet::ChangeSet object. creator A string representing who created this changeset. created A string representing the ISO 8601 date and time when this changeset was created (UTC). sequence_no The changeset's sequence number (in subversion terms, revision #) on the replica sending us the changeset. source_uuid The uuid of the replica sending us the change. original_source_uuid The uuid of the replica where the change was authored. original_sequence_no The changeset's sequence number (in subversion terms, revision #) on the replica where the change was originally created. is_nullification A boolean value specifying whether this is a nullification changeset or not. is_resolution A boolean value specifying whether this is a conflict resolution changeset or not. changes Returns an array of all the changes in the current changeset. has_changes Returns true if this changeset has any changes. add_change { change => Prophet::Change } Adds a new change to this changeset. as_hash Returns a reference to a representation of this changeset as a hash, containing all the properties in the package variable @SERIALIZE_PROPS, as well as a "changes" key containing hash representations of each change in the changeset, keyed on UUID. new_from_hashref HASHREF Takes a reference to a hash representation of a changeset (such as is returned by "as_hash" or serialized json) and returns a new Prophet::ChangeSet representation of it. Should be invoked as a class method, not an object method. For example: "Prophet::ChangeSet->new_from_hashref($ref_to_changeset_hash)" as_string ARGS Returns a single string representing the changes in this changeset. If $args{header_callback} is defined, the string returned from passing $self to the callback is prepended to the changeset string before it is returned (instead of "description_as_string"). If $args{skip_empty} is defined, an empty string is returned if the changeset contains no changes. The argument "change_filter" can be used to filter certain changes from the string representation; the function is passed a change and should return false if that change should be skipped. The "change_header" argument, if present, is passed to "$change->to_string" when individual changes are converted to strings. description_as_string Returns a string representing a description of this changeset. perl v5.10.1 2009-12-22 Prophet::ChangeSet(3pm)
Man Page