示例#1
0
 /** @test */
 public function shouldReturnCorrectValuesForAllFields()
 {
     $artifacts = new Artifacts('testmethod', 'testhost', 'testport', 'testresource', 'testtimestamp', 'testnonce', 'testext', 'testpayload', 'testcontenttype', 'testhash', 'testapp', 'testdlg');
     $this->assertEquals('testmethod', $artifacts->method());
     $this->assertEquals('testhost', $artifacts->host());
     $this->assertEquals('testport', $artifacts->port());
     $this->assertEquals('testresource', $artifacts->resource());
     $this->assertEquals('testtimestamp', $artifacts->timestamp());
     $this->assertEquals('testnonce', $artifacts->nonce());
     $this->assertEquals('testext', $artifacts->ext());
     $this->assertEquals('testpayload', $artifacts->payload());
     $this->assertEquals('testcontenttype', $artifacts->contentType());
     $this->assertEquals('testhash', $artifacts->hash());
     $this->assertEquals('testapp', $artifacts->app());
     $this->assertEquals('testdlg', $artifacts->dlg());
 }
示例#2
0
         endOnError('Permission Denied');
     }
 }
 //
 //	Create the ArtifactType object
 //
 $ath = new ArtifactType($group, $atid);
 if (!$ath || !is_object($ath)) {
     endOnError('ArtifactType could not be created');
 } elseif ($ath->isError()) {
     endOnError($ath->getErrorMessage());
 }
 //
 // Create the Artifacts object
 //
 $artifacts = new Artifacts($ath);
 if (!$artifacts || !is_object($ath)) {
     endOnError('Artifacts could not be created');
 }
 if ($artifacts->isError()) {
     endOnError($artifacts->getErrorMessage());
 }
 //
 // Loop through each artifact object and show the results
 //
 if (!($alist =& $artifacts->getArtifacts($offset))) {
     displayError($artifacts->getErrorMessage());
     $errors = true;
 }
 if ($errors) {
     endDocument();