The testing tag has no wiki summary.
0
votes
3answers
38 views
How to test if user is denied access when her role has no “access content”
Wanting to test that only users with "access content" have access:
public function testOnlyAccessContentAccessible() {
$web_user = $this->drupalCreateUser();
$this->drupalLogin($web_user);
...
0
votes
1answer
24 views
How do I run unit tests against datasets? (DrupalWebTestCase and DrupalTestCase)
I am testing a module that I am writing against the Unit Testing framework that comes with Drupal 7. All makes sense, and everything asserts as it should.
My question though, is it possible to run ...
1
vote
0answers
22 views
Press 'continue' button in simpletest
I am trying to enable modules via POSTing to /admin/modules in a simpletest. It works fine, except that there are dependencies (the whole reason I want to do it this way) and when it requires then ...
0
votes
1answer
71 views
Simpletest fails to create the field_config table
I'm only just getting into TDD with Drupal and unfortunately run into trouble right away. For some reason the simpletest####field_config table isn't being created, and I don't get why; many other ...
3
votes
1answer
39 views
Automated testing module for entire site
I'm looking for a module which will test an entire site each an OS update, or a Drupal core update. E.g. go through each node and let me know there are
any 404 returned for JS or CSS files,
broken ...
0
votes
0answers
17 views
Is there a way to test or spoof different user access? [duplicate]
Possible Duplicate:
Multi-user/role testing, best practices
My current style in testing different user access is opening a different browser or opening a private session and logging into a ...
0
votes
1answer
28 views
Why is my alias “NULL” in a test?
I am using Drupal 7, I have Pathauto enabled, and my user has permissions to create new aliases.
When I manually create a node, uncheck the checkbox for automatic alias generation, and enter a custom ...
2
votes
1answer
29 views
Version numbers of dependencies in testing
If I'm submitting a test to the qa.drupal.org testbot, and my module requires a dev version of another module in order to function properly, is it adequate to declare the version in my module's .info ...
0
votes
1answer
62 views
Is there a clean-URL-reflective version of file_create_url()?
I have a site with clean URLs enabled and in a test I've written, I compare the current drupalGetHeader('location') to file_create_url($file->uri). The tests passes on my site, but on the ...
0
votes
1answer
29 views
Does DrupalWebTestCase::drupalGet() use the permissions of DrupalWebTestCase::$loggedInUser?
I'm trying to test the permissions of a particular role, and this code:
$this->drupalLogin($this->editor_user);
$this->drupalGet($node->path['source']);
returns a 200 (OK) status, when ...
2
votes
1answer
48 views
Programmatically save altered file
As I mentioned in my previous question I'm attempting to write tests for a patch that will, ideally, trigger the creation of a redirect if the URI of a file changes.
My patch uses hook_file_update() ...
0
votes
0answers
58 views
Media module, file usage, and simpletest
I'm trying to write a test that will do the following:
Create a user
Create an 'article' node
Upload a file via Media module
Insert that file into the body via pre-determined markup
Save the node
...
4
votes
2answers
126 views
Write Drupal Code online
Is there any website that allows to write and test Drupal Code online ? Like this one for PHP writecodeonline.
0
votes
1answer
30 views
Why is my patch failing a test?
When a patch fails testing because it doesn't apply, and the error reads "Ensure the patch applies to the tip of the chosen code-base." what does this mean?
3
votes
1answer
72 views
Invoking Drupal core tests from within a custom module .test script
I am writing a simpletest test script, where I would like to enable my module, and then invoke a Drupal core test to ensure that my module is producing core-compliant results (in particular, I render ...