Skip to content

Commit

Permalink
Add use Exception in XmlCompactDocument.
Browse files Browse the repository at this point in the history
  • Loading branch information
= committed Feb 25, 2016
1 parent e9c076f commit 8344c91
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 10 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "qtism/qtism",
"description": "OAT QTI Software Module Library",
"type": "library",
"version": "0.9.19",
"version": "0.9.20",
"authors": [
{
"name": "Open Assessment Technologies S.A.",
Expand Down
2 changes: 1 addition & 1 deletion qtism/data/storage/xml/XmlCompactDocument.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
namespace qtism\data\storage\xml;

use qtism\data\content\RubricBlockRef;

use qtism\data\QtiComponentIterator;
use qtism\data\QtiComponent;
use qtism\data\TestPart;
Expand All @@ -41,6 +40,7 @@
use qtism\data\storage\xml\marshalling\CompactMarshallerFactory;
use \DOMElement;
use \SplObjectStorage;
use \Exception;

class XmlCompactDocument extends XmlDocument {

Expand Down
8 changes: 2 additions & 6 deletions test/qtism/common/datatypes/DurationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ public function testInvalidDurationCreation($intervalSpec) {
}

public function testPositiveDuration() {
$duration = new Duration('P3Y4DT6H8M'); // 2 years, 4 days, 6 hours, 8 minutes, 0 seconds, 0 microseconds.
$duration = new Duration('P3Y0DT6H8M'); // 2 years, 0 days, 6 hours, 8 minutes, 0 seconds, 0 microseconds.
$this->assertEquals(3, $duration->getYears());
$this->assertEquals(0, $duration->getMonths());
$this->assertEquals(4, $duration->getDays());
$this->assertEquals(0, $duration->getDays());
$this->assertEquals(6, $duration->getHours());
$this->assertEquals(8, $duration->getMinutes());
$this->assertEquals(0, $duration->getSeconds());
Expand All @@ -43,10 +43,6 @@ public function testEquality() {
$this->assertFalse($d3->equals($d1));
$this->assertTrue($d3->equals($d3));
}

public function testNegativeDuration() {
$duration = new Duration('P2Y4DT6H8M'); // - 2 years, 4 days, 6 hours, 8 minutes.
}

public function testConstruct()
{
Expand Down
4 changes: 2 additions & 2 deletions test/qtism/runtime/pci/json/JsonMarshallerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public function testMarshallState(State $state, $expectedJson) {
* @param mixed $input
*/
public function testMarshallInvalidInput($input) {
$this->setExpectedException('qtism\\runtime\\pci\\json\\MarshallingException', MarshallingException::NOT_SUPPORTED);
$this->setExpectedException('qtism\\runtime\\pci\\json\\MarshallingException', '', MarshallingException::NOT_SUPPORTED);
$marshaller = new Marshaller();
$marshaller->marshall($input);
}
Expand Down Expand Up @@ -310,4 +310,4 @@ public function marshallInvalidInputProvider() {
array(new \stdClass())
);
}
}
}

0 comments on commit 8344c91

Please sign in to comment.