Skip to content

Commit 5d58a26

Browse files
committed
Fix test not being executed
The runSampleDataTests() call in testGetData() triggers an exception which prevents all subsequent tests from running. Moving this code into a separate tests ensures that this particual test runs instead of being skipped over.
1 parent 4ae65e3 commit 5d58a26

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

tests/DataTest.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,10 +191,18 @@ public function testGetData()
191191
$data = $wrappedData->getData('wrapped.sampleData');
192192

193193
$this->runSampleDataTests($data);
194+
}
195+
196+
public function testGetDataOnNonArrayValue()
197+
{
198+
$data = new Data([
199+
'foo' => 'bar',
200+
]);
194201

195202
$this->expectException(DataException::class);
203+
$this->expectExceptionMessageRegExp('/could not be represented as a DataInterface/');
196204

197-
$data = $wrappedData->getData('wrapped.sampleData.a');
205+
$data->getData('foo');
198206
}
199207

200208
public function testImport()

0 commit comments

Comments
 (0)