예제 #1
0
파일: HTMLPageTest.php 프로젝트: undera/pwe
 public function testGetVisitorOutput_OK()
 {
     $this->PWE->setURL("/htmltest/");
     $this->object = new HTMLPage($this->PWE);
     $this->object->process();
     $this->assertEquals("<html><head><title></title></head><body>TEST</body></html>", $this->PWE->getContent());
 }
예제 #2
0
 public function testAll()
 {
     foreach (array('DELETE', 'POST', 'PUT', 'PATCH') as $method) {
         $_SERVER['REQUEST_METHOD'] = $method;
         $_SERVER['HTTP_CONTENT_TYPE'] = 'application/json';
         $core = new UnitTestPWECore();
         $core->setURL('/123/');
         $obj = new AbstractRESTCallTestImpl($core);
         $obj->process();
         $this->assertNotEmpty($core->getContent());
     }
 }
예제 #3
0
 public function testProcess_github_small()
 {
     $PWE = new UnitTestPWECore();
     $PWE->setStructFile(__DIR__ . '/SimpleWiki.xml');
     $PWE->setURL('/github/GitHubMarkdownSmall/');
     $node =& $PWE->getNode();
     $node['!i']['wiki_dir'] = __DIR__;
     $obj = new SimpleWiki($PWE);
     $obj->process();
     $content = $PWE->getContent();
     PWELogger::debug("Rendered: %s", $content);
 }