public function testOwnsDenied() { $this->login('azerty'); CoOrg::process('MockAclBeforeTest/testOwns/qwerty'); $this->assertFlashError('You don\'t have the rights to view this page'); $this->assertRedirected(''); }
public function testThemes() { CoOrg::config()->set('path', '/'); CoOrg::config()->set('theme', 'testtheme'); CoOrg::process('/'); $this->assertEquals('/static/testtheme/mockfile.css?v=testtheme', CoOrg::staticFile('mockfile.css')); $this->assertEquals('/static/default/onlydefault.css?v=A', CoOrg::staticFile('onlydefault.css')); $this->assertEquals('/coorg/tests/mocks/plugins/alpha/static/testtheme/somefile.css?v=alphaV', CoOrg::staticFile('somefile.css', 'alpha')); $this->assertEquals('/coorg/tests/mocks/plugins/alpha/static/default/onlydefault.css?v=2010-10-03', CoOrg::staticFile('onlydefault.css', 'alpha')); $this->assertEquals(array( '/coorg/tests/mocks/plugins/alpha/static/default/extends.css?v=baseV', '/coorg/tests/mocks/plugins/alpha/static/testtheme/extends.css?v=extendsV'), CoOrg::staticFile('extends.css', 'alpha')); $this->assertEquals(array( '/static/default/extends.css?v=baseV', '/static/testtheme/extends.css?v=extendsV'), CoOrg::staticFile('extends.css')); }
protected function request($request, $postParams = array(), $isPost = true) { CoOrg::process($request, $postParams, $postParams != array() && $isPost); }
public function testRedirectWithSpecialSjeezelDoesWork() { CoOrg::process('alpha/doredirect'); $this->assertEquals('some/redirect/to/a$2fpagewith$3fstrangechars', Header::$redirect); }