Skip to content

Commit 0429681

Browse files
committed
Input/OutputCollectionMutatorTest: new expectException usage
1 parent 5e06d66 commit 0429681

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

tests/Transaction/Mutator/InputCollectionMutatorTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ public function testInvalidSlice()
4646
];
4747

4848
$mutator = new InputCollectionMutator($collection);
49+
$this->expectException(\RuntimeException::class);
4950
$mutator->slice(0, 1);
5051
}
5152

tests/Transaction/Mutator/OutputCollectionMutatorTest.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,13 @@ public function testSlice()
6464
$this->assertEquals(1, count($outputs));
6565
}
6666

67-
/**
68-
* @expectedException \RuntimeException
69-
*/
7067
public function testInvalidSlice()
7168
{
7269
$collection = [
7370
];
7471

7572
$mutator = new OutputCollectionMutator($collection);
73+
$this->expectException(\RuntimeException::class);
7674
$mutator->slice(0, 1);
7775
}
7876

@@ -103,12 +101,10 @@ public function testSet()
103101
$this->assertEquals(1, $newCollection[0]->getValue());
104102
}
105103

106-
/**
107-
* @expectedException \OutOfRangeException
108-
*/
109104
public function testInvalidIndex()
110105
{
111106
$mutator = new OutputCollectionMutator([]);
107+
$this->expectException(\OutOfRangeException::class);
112108
$mutator->offsetGet(10);
113109
}
114110
}

0 commit comments

Comments
 (0)