function setup() { $this->path = '/api/new'; $this->method = 'POST'; $this->test_data = new StdClass(); parent::setup(); }
protected function setUp() { global $argv; $browser = self::BROWSER; switch ($browser) { case 'phantomjs': self::$sleep = 0; break; } $this->setBrowser($browser); $this->setBrowserUrl(self::URL); $this->screenshotPath = __DIR__; self::$doc = new DocumentTemplate(); self::$doc->addChapter(self::getTitleFromAnnotation()); }
public static function startFtpServer() { // Arguments to server process $args = array('debugServerProtocolToFile' => NULL); // Start server process self::$serverProcess = Runtime::getInstance()->newInstance(NULL, 'class', 'net.xp_framework.unittest.peer.ftp.TestingServer', array_values($args)); self::$serverProcess->in->close(); // Check if startup succeeded $status = self::$serverProcess->out->readLine(); if (1 != sscanf($status, '+ Service %[0-9.:]', self::$bindAddress)) { try { self::shutdownFtpServer(); } catch (IllegalStateException $e) { $status .= $e->getMessage(); } throw new PrerequisitesNotMetError('Cannot start FTP server: ' . $status, NULL); } }
<?php $comps = IntegrationTest::model()->findAll(); $table = $table_creator->begin_table("|l|p{6cm}|l|l|") . $table_creator->heading_row(array("Test", "Descrizione", "Componente", "Stato")); foreach ($comps as $test) { $test->with('test', 'package'); $table .= $table_creator->row(array($test->public_id(), $test->test->description, $test->package->name, 'success')); } $table .= $table_creator->caption("Tabella test di integrazione") . $table_creator->end_table(); if ($table_creator->id() != 'html' && !$raw) { echo CodeGen::generic_render_code($table, 'latex', true); } else { echo $table; }
function setup() { $this->path = '/api/status'; $this->method = 'GET'; parent::setup(); }
function setup() { $this->path = '/api/new'; $this->method = 'POST'; parent::setup(); }
function setup() { $this->test_data = new StdClass(); parent::setup(); }