X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fmodules%2Fcontrib%2Fphp%2Fsrc%2FTests%2FPhpAccessTest.php;fp=web%2Fmodules%2Fcontrib%2Fphp%2Fsrc%2FTests%2FPhpAccessTest.php;h=daa9669d1dbf8449a81fab4f2bd173ecc0bb4ee7;hp=0000000000000000000000000000000000000000;hb=8acec36f19c470dfcda1ae2336826a782f41874c;hpb=e0411c4e83ba0d079034db83c3f7f55be24a0e35 diff --git a/web/modules/contrib/php/src/Tests/PhpAccessTest.php b/web/modules/contrib/php/src/Tests/PhpAccessTest.php new file mode 100644 index 000000000..daa9669d1 --- /dev/null +++ b/web/modules/contrib/php/src/Tests/PhpAccessTest.php @@ -0,0 +1,35 @@ +drupalCreateUser(['access content', 'create page content', 'edit own page content']); + $this->drupalLogin($web_user); + $node = $this->createNodeWithCode(); + + // Make sure that the PHP code shows up as text. + $this->drupalGet('node/' . $node->id()); + $this->assertText('print', 'PHP code was not evaluated.'); + + // Make sure that user doesn't have access to filter. + $this->drupalGet('node/' . $node->id() . '/edit'); + $this->assertNoRaw('