Active
Project:
SimpleTest
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
25 Apr 2011 at 11:37 UTC
Updated:
30 Aug 2011 at 09:27 UTC
The code beneath is in my test class, but when I create a drupal user with the 'user test amfservice' permissions the creation fails (see screenshot of the test).
The 'use test amfservice' is a valid permission in the amfserver module.
Anyone have a clue? Do I need to set it first?
require_once 'SabreAMF/Client.php';
class AmfServerTestCase extends ServicesWebtestCase {
protected $privileged_user = NULL;
protected $endpoint = NULL;
protected $client = NULL;
protected $endpoint_url = NULL;
/**
* Implementation of setUp().
*/
public function setUp() {
parent::setUp ( 'amfserver' );
// Set up endpoint.
$this->endpoint = $this->saveAMFEndpoint ();
$this->endpoint_url = $this->getAbsoluteUrl ( $this->endpoint->path );
$this->client = new SabreAMF_Client ( $this->endpoint_url );
$this->client->setEncoding ( 3 );
}
public function testEndPoint() {
$page = $this->getEndpoint ( $this->endpoint_url );
$this->assertContainsText ( $page, 'The amfserver with Zend AMF is installed and working.', 'endpoint call in browser functions normally: ' . substr ( $page, 0, 150 ) . "....", 'amfserver: test' );
$this->privileged_user = $this->drupalCreateUser(array('administer users', 'access user profiles', 'use test amfservice'));
$this->drupalLogin($this->privileged_user);
$page = $this->getEndpoint ( $this->endpoint_url );
$this->assertContainsText ( $page, 'The amfserver with Zend AMF is installed and working.', 'endpoint call in browser (with logged in user) functions normally: ' . substr ( $page, 0, 150 ) . "....", 'amfserver: test' );
}
| Comment | File | Size | Author |
|---|---|---|---|
| Screen shot 2011-04-25 at 13.35.03 .png | 330.61 KB | rolf vreijdenberger |
Comments
Comment #1
kylebrowning commentedThis is a simpletest Support Request.
Comment #2
patrickd commentedGot the same problem here on my working station.
Any test (eg. node.test) produces permission errors like "invalid permission ´create page content´"
But it works on my laptop.
Comment #3
rolf vreijdenberger commentedhi Patrick,
what would be the obvious differences in your setup between the laptop and the workstation?
I use a mamp installation on my mac.
what do you use?
Comment #4
patrickd commentedIt's all very strange:
My laptop has a standart apache2/PHP5 installation
My workstation is the same but we are using workflow automation by different shell scripts (like creating new sites)
so I thought this is the problem
but my workmate uses exactly the same configuration (ubuntu clones) and it works good for him..
Too hard to guess what the problem is, I'll reinstall the clone hoping it will work then