Skip to content

Commit

Permalink
updated xml tests with 3.0 syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
TRPB committed Mar 6, 2018
1 parent eb53bce commit 5ff15b5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions tests/Loaders/XmlLoaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public function testSubstitutions() {


$equivalentRule = [];
$equivalentRule['substitutions']['B'] = ['instance' => 'C'];
$equivalentRule['substitutions']['B'] = [\Dice\Dice::INSTANCE => 'C'];

$this->dice->expects($this->once())->method('addRule')->with($this->equalTo('A'), $this->equalTo($equivalentRule));
$this->xmlLoader->load(simplexml_load_string($xml), $this->dice);
Expand All @@ -126,8 +126,8 @@ public function testSubstitutions2() {


$equivalentRule = $this->dice->getRule('*');
$equivalentRule['substitutions']['B'] = ['instance' => 'C'];
$equivalentRule['substitutions']['F'] = ['instance' => 'E'];
$equivalentRule['substitutions']['B'] = [\Dice\Dice::INSTANCE => 'C'];
$equivalentRule['substitutions']['F'] = [\Dice\Dice::INSTANCE => 'E'];


$this->dice->expects($this->once())->method('addRule')->with($this->equalTo('A'), $this->equalTo($equivalentRule));
Expand Down
6 changes: 3 additions & 3 deletions tests/Loaders/XmlLoaderV2Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public function testSubstitutions() {


$equivalentRule = [];
$equivalentRule['substitutions']['B'] = ['instance' => 'C'];
$equivalentRule['substitutions']['B'] = [\Dice\Dice::INSTANCE => 'C'];

$this->dice->expects($this->once())->method('addRule')->with($this->equalTo('A'), $this->equalTo($equivalentRule));
$this->xmlLoader->load(simplexml_load_string($xml), $this->dice);
Expand All @@ -111,8 +111,8 @@ public function testSubstitutions2() {


$equivalentRule = $this->dice->getRule('*');
$equivalentRule['substitutions']['B'] = ['instance' => 'C'];
$equivalentRule['substitutions']['F'] = ['instance' => 'E'];
$equivalentRule['substitutions']['B'] = [\Dice\Dice::INSTANCE => 'C'];
$equivalentRule['substitutions']['F'] = [\Dice\Dice::INSTANCE => 'E'];


$this->dice->expects($this->once())->method('addRule')->with($this->equalTo('A'), $this->equalTo($equivalentRule));
Expand Down

0 comments on commit 5ff15b5

Please sign in to comment.