From 5ff15b52380bf30b647105f85484163287b39b38 Mon Sep 17 00:00:00 2001 From: Tom Butler Date: Tue, 6 Mar 2018 15:30:32 +0000 Subject: [PATCH] updated xml tests with 3.0 syntax --- tests/Loaders/XmlLoaderTest.php | 6 +++--- tests/Loaders/XmlLoaderV2Test.php | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/Loaders/XmlLoaderTest.php b/tests/Loaders/XmlLoaderTest.php index d21600a..fa382a4 100644 --- a/tests/Loaders/XmlLoaderTest.php +++ b/tests/Loaders/XmlLoaderTest.php @@ -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); @@ -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)); diff --git a/tests/Loaders/XmlLoaderV2Test.php b/tests/Loaders/XmlLoaderV2Test.php index 0fc5272..01f77bf 100644 --- a/tests/Loaders/XmlLoaderV2Test.php +++ b/tests/Loaders/XmlLoaderV2Test.php @@ -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); @@ -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));