@@ -50,7 +50,7 @@ public function testInstanceOf()
50
50
}
51
51
52
52
/**
53
- * @expectedException \Exception
53
+ * @expectedException \Magento\Framework\DB\Adapter\ConnectionException
54
54
* @expectedExceptionMessage The write connection to the database isn't available. Please try again later.
55
55
*/
56
56
public function testCheckConnectionException ()
@@ -79,7 +79,7 @@ public function testGetViewId()
79
79
}
80
80
81
81
/**
82
- * @expectedException \Exception
82
+ * @expectedException \DomainException
83
83
* @expectedExceptionMessage View's identifier is not set
84
84
*/
85
85
public function testGetNameWithException ()
@@ -106,6 +106,10 @@ public function testGetVersion()
106
106
$ this ->assertEquals (10 , $ this ->model ->getVersion ());
107
107
}
108
108
109
+ /**
110
+ * @expectedException \Magento\Framework\Exception\RuntimeException
111
+ * @expectedExceptionMessage Table status for viewIdtest_cl is incorrect. Can`t fetch version id.
112
+ */
109
113
public function testGetVersionWithExceptionNoAutoincrement ()
110
114
{
111
115
$ changelogTableName = 'viewIdtest_cl ' ;
@@ -116,8 +120,6 @@ public function testGetVersionWithExceptionNoAutoincrement()
116
120
->method ('fetchRow ' )
117
121
->will ($ this ->returnValue ([]));
118
122
119
- $ this ->expectException ('Exception ' );
120
- $ this ->expectExceptionMessage ("Table status for {$ changelogTableName } is incorrect. Can`t fetch version id. " );
121
123
$ this ->model ->setViewId ('viewIdtest ' );
122
124
$ this ->model ->getVersion ();
123
125
}
0 commit comments