Skip to content

Commit

Permalink
Merge branch 'Alroniks-clearance' into legacy
Browse files Browse the repository at this point in the history
  • Loading branch information
bugalot committed Sep 3, 2015
2 parents d5f89da + fefa6d1 commit bad4182
Show file tree
Hide file tree
Showing 87 changed files with 87 additions and 265 deletions.
3 changes: 1 addition & 2 deletions test/qtism/data/storage/UtilsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
use qtism\data\storage\Utils;
use qtism\common\enums\BaseType;
use qtism\common\datatypes\Shape;
use \stdClass;

require_once (dirname(__FILE__) . '/../../../QtiSmTestCase.php');

Expand Down Expand Up @@ -358,4 +357,4 @@ public function invalidUriToSanitizeProvider() {
array(true)
);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
use qtism\common\storage\MemoryStream;
use qtism\data\storage\php\marshalling\PhpMarshallingContext;
use qtism\data\storage\php\PhpStreamAccess;
use \RuntimeException;
use \InvalidArgumentException;

require_once (dirname(__FILE__) . '/../../../../../QtiSmTestCase.php');

Expand Down Expand Up @@ -119,4 +117,4 @@ public function testGenerateVariableName() {
$this->assertEquals('point_1', $ctx->generateVariableName(new Point(0, 1)));
$this->assertEquals('coords_2', $ctx->generateVariableName(new Coords(Shape::CIRCLE, array(5, 5, 3))));
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
use qtism\data\storage\LocalFileResolver;
use qtism\data\NavigationMode;
use qtism\data\storage\xml\XmlDocument;
use qtism\data\AssessmentTest;
use \DOMDocument;

require_once (dirname(__FILE__) . '/../../../../QtiSmTestCase.php');

Expand Down Expand Up @@ -217,4 +215,4 @@ public function testExplodeRubricBlocks() {

unlink($file);
}
}
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
<?php

use qtism\data\storage\xml\marshalling\Marshaller;
use qtism\data\expressions\ExpressionCollection;
use qtism\data\expressions\operators\AnyN;
use qtism\data\expressions\BaseValue;
use qtism\common\enums\BaseType;
use \DOMDocument;

require_once (dirname(__FILE__) . '/../../../../../QtiSmTestCase.php');

Expand Down Expand Up @@ -53,4 +51,4 @@ public function testUnmarshall() {
$this->assertEquals(2, $component->getMax());
$this->assertEquals(3, count($component->getExpressions()));
}
}
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
<?php

use qtism\data\storage\xml\marshalling\Marshaller;
use qtism\data\state\AreaMapEntry;
use qtism\common\datatypes\Shape;
use qtism\common\datatypes\Coords;
use \DOMDocument;

require_once (dirname(__FILE__) . '/../../../../../QtiSmTestCase.php');

Expand Down Expand Up @@ -41,4 +39,4 @@ public function testUnmarshall() {
$this->assertInternalType('float', $component->getMappedValue());
$this->assertEquals(1.337, $component->getMappedValue());
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@

use qtism\common\datatypes\Coords;
use qtism\common\datatypes\Shape;
use qtism\data\storage\xml\marshalling\Marshaller;
use qtism\data\state\AreaMapping;
use qtism\data\state\AreaMapEntry;
use qtism\data\state\AreaMapEntryCollection;
use \DOMDocument;

require_once (dirname(__FILE__) . '/../../../../../QtiSmTestCase.php');

Expand Down Expand Up @@ -46,4 +44,4 @@ public function testUnmarshallMinimal() {

$this->assertInstanceOf('qtism\\data\\state\\AreaMapping', $component);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,8 @@
use qtism\data\state\OutcomeDeclaration;
use qtism\common\enums\Cardinality;
use qtism\common\enums\BaseType;
use qtism\data\storage\xml\marshalling\Marshaller;
use qtism\data\AssessmentItem;

use \DOMDocument;

require_once (dirname(__FILE__) . '/../../../../../QtiSmTestCase.php');

class AssessmentItemMarshallerTest extends QtiSmTestCase {
Expand Down Expand Up @@ -146,4 +143,4 @@ public function testUnmarshallMaximal() {
$outcomeDeclarations = $component->getOutcomeDeclarations();
$this->assertEquals(2, count($outcomeDeclarations));
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

use qtism\common\datatypes\Duration;
use qtism\common\enums\BaseType;
use qtism\data\storage\xml\marshalling\Marshaller;
use qtism\data\AssessmentItemRef;
use qtism\data\state\WeightCollection;
use qtism\data\state\Weight;
Expand All @@ -18,7 +17,6 @@
use qtism\data\TimeLimits;
use qtism\data\ItemSessionControl;
use qtism\common\collections\IdentifierCollection;
use \DOMDocument;

require_once (dirname(__FILE__) . '/../../../../../QtiSmTestCase.php');

Expand Down Expand Up @@ -174,4 +172,4 @@ public function testUnmarshallMaximal() {
$this->assertInstanceOf('qtism\\data\\TimeLimits', $component->getTimeLimits());
$this->assertInstanceOf('qtism\\data\\ItemSessionControl', $component->getItemSessionControl());
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,13 @@
use qtism\data\AssessmentItemRef;
use qtism\data\SectionPartCollection;
use qtism\data\ItemSessionControl;
use qtism\data\storage\xml\marshalling\Marshaller;
use qtism\data\AssessmentSection;
use qtism\data\rules\PreCondition;
use qtism\data\rules\PreConditionCollection;
use qtism\data\rules\BranchRule;
use qtism\data\rules\BranchRuleCollection;
use qtism\data\expressions\BaseValue;
use qtism\common\enums\BaseType;
use \DOMDocument;

require_once (dirname(__FILE__) . '/../../../../../QtiSmTestCase.php');

Expand Down Expand Up @@ -314,4 +312,4 @@ public function testUnmarshallOneSectionAssessmentItemRefOnly() {
$assessmentItemRefs = $component->getSectionParts();
$this->assertEquals(3, count($assessmentItemRefs));
}
}
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
<?php

use qtism\data\storage\xml\marshalling\Marshaller;
use qtism\data\AssessmentSectionRef;
use \DOMDocument;

require_once (dirname(__FILE__) . '/../../../../../QtiSmTestCase.php');

Expand Down Expand Up @@ -34,4 +32,4 @@ public function testUnmarshall() {
$this->assertEquals($component->getIdentifier(), 'mySectionRef');
$this->assertEquals($component->getHref(), 'http://www.rdfabout.com');
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@
use qtism\data\TestPart;
use qtism\data\AssessmentSectionCollection;
use qtism\data\AssessmentSection;
use qtism\data\storage\xml\marshalling\Marshaller;
use qtism\data\AssessmentTest;
use \DOMDocument;

require_once (dirname(__FILE__) . '/../../../../../QtiSmTestCase.php');

Expand Down Expand Up @@ -119,4 +117,4 @@ public function testUnmarshall() {
$this->assertEquals(1, count($component->getOutcomeDeclarations()));
$this->assertEquals(1, count($component->getOutcomeProcessing()));
}
}
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
<?php

use qtism\data\storage\xml\marshalling\Marshaller;
use qtism\data\expressions\BaseValue;
use qtism\common\enums\BaseType;
use qtism\data\storage\Utils;
use \DOMDocument;

require_once (dirname(__FILE__) . '/../../../../../QtiSmTestCase.php');

Expand Down Expand Up @@ -46,4 +43,4 @@ public function testUnmarshallCDATA() {
$this->assertEquals($component->getBaseType(), BaseType::STRING);
$this->assertEquals('A string...', $component->getValue());
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
use qtism\data\content\TextRun;
use qtism\data\content\FlowCollection;
use qtism\data\content\xhtml\text\Div;
use \DOMDocument;

require_once (dirname(__FILE__) . '/../../../../../QtiSmTestCase.php');

Expand Down Expand Up @@ -60,4 +59,4 @@ public function testMarshall() {

$this->assertEquals('<blockquote class="physics"><h4>Albert Einstein</h4><div class="description">An old Physicist.</div></blockquote>', $dom->saveXML($element));
}
}
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
<?php

use qtism\data\storage\xml\marshalling\Marshaller;
use qtism\data\rules\BranchRule;
use qtism\data\expressions\BaseValue;
use qtism\common\enums\BaseType;
use \DOMDocument;

require_once (dirname(__FILE__) . '/../../../../../QtiSmTestCase.php');

Expand Down Expand Up @@ -41,4 +39,4 @@ public function testUnmarshall() {
$this->assertEquals('target1', $component->getTarget());
$this->assertInstanceOf('qtism\\data\\expressions\\BaseValue', $component->getExpression());
}
}
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
<?php

use qtism\data\storage\xml\marshalling\Marshaller;
use qtism\data\expressions\Correct;
use \DOMDocument;

require_once (dirname(__FILE__) . '/../../../../../QtiSmTestCase.php');

Expand Down Expand Up @@ -31,4 +29,4 @@ public function testUnmarshall() {
$this->assertInstanceOf('qtism\\data\\expressions\\Correct', $component);
$this->assertEquals($component->getIdentifier(), 'myCorrect1');
}
}
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
<?php

use qtism\data\storage\xml\marshalling\Marshaller;
use qtism\data\state\CorrectResponse;
use qtism\data\state\Value;
use qtism\data\state\ValueCollection;
use qtism\common\enums\BaseType;
use qtism\common\datatypes\Pair;
use \DOMDocument;

require_once (dirname(__FILE__) . '/../../../../../QtiSmTestCase.php');

Expand Down Expand Up @@ -83,4 +81,4 @@ public function testUnmarshallTwo() {
$this->assertFalse($value->isPartOfRecord());
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
use qtism\common\enums\BaseType;
use qtism\data\expressions\BaseValue;
use qtism\data\expressions\operators\CustomOperator;
use \DOMDocument;

require_once (dirname(__FILE__) . '/../../../../../QtiSmTestCase.php');

Expand Down Expand Up @@ -45,4 +44,4 @@ public function testUnmarshall() {
$this->assertEquals(BaseType::INTEGER, $subExpressions[1]->getBaseType());
$this->assertEquals(1, $subExpressions[1]->getValue());
}
}
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
<?php

use qtism\data\storage\xml\marshalling\Marshaller;
use qtism\data\expressions\DefaultVal;
use \DOMDocument;

require_once (dirname(__FILE__) . '/../../../../../QtiSmTestCase.php');

Expand Down Expand Up @@ -31,4 +29,4 @@ public function testUnmarshall() {
$this->assertInstanceOf('qtism\\data\\expressions\\DefaultVal', $component);
$this->assertEquals($component->getIdentifier(), 'myDefault1');
}
}
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
<?php

use qtism\data\storage\xml\marshalling\Marshaller;
use qtism\data\state\DefaultValue;
use qtism\data\state\Value;
use qtism\data\state\ValueCollection;
use qtism\common\enums\BaseType;
use qtism\common\datatypes\Pair;
use \DOMDocument;

require_once (dirname(__FILE__) . '/../../../../../QtiSmTestCase.php');

Expand Down Expand Up @@ -130,4 +128,4 @@ public function testUnmarshallThree() {
$this->assertEquals(BaseType::IDENTIFIER, $valuesCollection[3]->getBaseType());
$this->assertFalse($valuesCollection[3]->hasFieldIdentifier());
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
use qtism\data\content\xhtml\lists\Ul;
use qtism\data\content\FlowCollection;
use qtism\data\content\xhtml\lists\Li;
use \DOMDocument;

require_once (dirname(__FILE__) . '/../../../../../QtiSmTestCase.php');

Expand Down Expand Up @@ -154,4 +153,4 @@ public function testMarshall() {
$expected = '<div id="main-container" class="ui-pane"><div id="menu"><ul><li>Start the Game</li><li>Configure Inputs</li><li>Hall of Fame</li><li>Quit</li></ul></div><div id="content"><h1>Escape from Death Star</h1><p class="short-story">An <strong>incredible</strong> adventure.</p></div></div>';
$this->assertEquals($expected, $dom->saveXML($element));
}
}
}
3 changes: 1 addition & 2 deletions test/qtism/data/storage/xml/marshalling/DlMarshallerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
use qtism\data\content\TextRun;
use qtism\data\content\InlineCollection;
use qtism\data\content\xhtml\lists\Dt;
use \DOMDocument;

require_once (dirname(__FILE__) . '/../../../../../QtiSmTestCase.php');

Expand Down Expand Up @@ -79,4 +78,4 @@ public function testMarshall() {

$this->assertEquals('<dl id="my-description-list"><dt>Cola</dt><dd class="soda">Black sparkling soda.</dd><dt class="beverage">Tea</dt><dd>Hot water with something</dd></dl>', $dom->saveXML($element));
}
}
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
<?php

use qtism\data\storage\xml\marshalling\Marshaller;
use qtism\data\expressions\ExpressionCollection;
use qtism\data\expressions\operators\Equal;
use qtism\data\expressions\operators\ToleranceMode;
use qtism\data\expressions\BaseValue;
use qtism\common\enums\BaseType;
use \DOMDocument;

require_once (dirname(__FILE__) . '/../../../../../QtiSmTestCase.php');

Expand Down Expand Up @@ -59,4 +57,4 @@ public function testUnmarshall() {
$this->assertTrue($component->doesIncludeUpperBound());
$this->assertEquals(2, count($component->getExpressions()));
}
}
}
Loading

0 comments on commit bad4182

Please sign in to comment.