PHPunit deprecations

This commit is contained in:
Dan Hensby 2020-04-01 18:10:46 +01:00
parent be83e2afa8
commit 52817facf6
No known key found for this signature in database
GPG Key ID: F76D6B5FE0626A99
1 changed files with 4 additions and 8 deletions

View File

@ -25,22 +25,18 @@ class SilverStripeContextTest extends TestCase
SapphireTest::start();
}
/**
* @expectedException \LogicException
* @expectedExceptionMessage Cannot find 'region_map' in the behat.yml
*/
public function testGetRegionObjThrowsExceptionOnUnknownSelector()
{
$this->expectException(\LogicException::class);
$this->expectExceptionMessage('Cannot find \'region_map\' in the behat.yml');
$context = $this->getContextMock();
$context->getRegionObj('.unknown');
}
/**
* @expectedException \LogicException
* @expectedExceptionMessage Cannot find the specified region in the behat.yml
*/
public function testGetRegionObjThrowsExceptionOnUnknownRegion()
{
$this->expectException(\LogicException::class);
$this->expectExceptionMessage('Cannot find the specified region in the behat.yml');
$context = $this->getContextMock();
$context->setRegionMap(array('MyRegion' => '.my-region'));
$context->getRegionObj('.unknown');