This repository was archived by the owner on Jan 31, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 7
7
8
8
namespace ZendTest \View \Helper ;
9
9
10
- use PHPUnit_Framework_TestCase as TestCase ;
10
+ use PHPUnit \ Framework \ TestCase ;
11
11
use Zend \ServiceManager \ServiceManager ;
12
12
use Zend \View \Exception ;
13
13
use Zend \View \Helper \Asset ;
@@ -50,7 +50,8 @@ public function testHelperPluginManagerReturnsAssetHelperByClassName()
50
50
51
51
public function testInvalidAssetName ()
52
52
{
53
- $ this ->setExpectedException (Exception \InvalidArgumentException::class, 'Asset is not defined. ' );
53
+ $ this ->expectException (Exception \InvalidArgumentException::class);
54
+ $ this ->expectExceptionMessage ('Asset is not defined ' );
54
55
55
56
$ this ->asset ->__invoke ('unknown ' );
56
57
}
Original file line number Diff line number Diff line change 7
7
8
8
namespace ZendTest \View \Helper \Service ;
9
9
10
- use PHPUnit_Framework_TestCase as TestCase ;
10
+ use PHPUnit \ Framework \ TestCase ;
11
11
use Zend \ServiceManager \ServiceManager ;
12
12
use Zend \View \Exception ;
13
13
use Zend \View \Helper \Asset ;
@@ -68,7 +68,8 @@ public function testInvalidConfiguration()
68
68
69
69
$ assetFactory = new AssetFactory ();
70
70
71
- $ this ->setExpectedException (Exception \RuntimeException::class, 'Invalid resource map configuration. ' );
71
+ $ this ->expectException (Exception \RuntimeException::class);
72
+ $ this ->expectExceptionMessage ('Invalid resource map configuration ' );
72
73
$ assetFactory ($ services , '' );
73
74
}
74
75
You can’t perform that action at this time.
0 commit comments