-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP: Add test for submission validation
- Loading branch information
1 parent
63bef62
commit 4602d25
Showing
3 changed files
with
54 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<?php | ||
require_once dirname(__FILE__) . '/cdash_test_case.php'; | ||
|
||
|
||
use CDash\Model\Build; | ||
use App\Models\BuildInformation; | ||
|
||
class SubmissionValidationTestCase extends KWWebTestCase | ||
{ | ||
protected $PDO; | ||
protected $ConfigFile; | ||
protected $Original; | ||
|
||
public function _construct() { | ||
|
||
parent::__construct(); | ||
} | ||
|
||
public function submit($fileName) | ||
{ | ||
$rep = dirname(__FILE__) . '/../../../tests/data/XmlValidation'; | ||
$file = "$rep/$fileName"; | ||
#print_r($file); | ||
#print_r(file_get_contents($file)); | ||
#print($this->submission('InsightExample', $file)); | ||
if (false) { | ||
return false; | ||
} | ||
|
||
$this->assertTrue(true, "Submission of $file has succeeded"); | ||
} | ||
|
||
public function testSubmissionValidation() | ||
{ | ||
|
||
$this->ConfigFile = dirname(__FILE__) . '/../../../.env'; | ||
$this->Original = file_get_contents($this->ConfigFile); | ||
#print_r($this->Original); | ||
file_put_contents($this->ConfigFile, "VALIDATE_XML_SUBMISSIONS=true\n", FILE_APPEND | LOCK_EX); | ||
|
||
|
||
$this->submit("invalid_Configure.xml"); | ||
# $this->submit("valid_Build.xml"); | ||
|
||
|
||
file_put_contents($this->ConfigFile, $this->Original); | ||
} | ||
} |