Skip to content

Commit ec25987

Browse files
authored
Update ChangelogTest.php
1 parent c3fdc92 commit ec25987

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

lib/internal/Magento/Framework/Mview/Test/Unit/View/ChangelogTest.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public function testInstanceOf()
5050
}
5151

5252
/**
53-
* @expectedException \Exception
53+
* @expectedException \Magento\Framework\DB\Adapter\ConnectionException
5454
* @expectedExceptionMessage The write connection to the database isn't available. Please try again later.
5555
*/
5656
public function testCheckConnectionException()
@@ -79,7 +79,7 @@ public function testGetViewId()
7979
}
8080

8181
/**
82-
* @expectedException \Exception
82+
* @expectedException \DomainException
8383
* @expectedExceptionMessage View's identifier is not set
8484
*/
8585
public function testGetNameWithException()
@@ -106,6 +106,10 @@ public function testGetVersion()
106106
$this->assertEquals(10, $this->model->getVersion());
107107
}
108108

109+
/**
110+
* @expectedException \Magento\Framework\Exception\RuntimeException
111+
* @expectedExceptionMessage Table status for viewIdtest_cl is incorrect. Can`t fetch version id.
112+
*/
109113
public function testGetVersionWithExceptionNoAutoincrement()
110114
{
111115
$changelogTableName = 'viewIdtest_cl';
@@ -116,8 +120,6 @@ public function testGetVersionWithExceptionNoAutoincrement()
116120
->method('fetchRow')
117121
->will($this->returnValue([]));
118122

119-
$this->expectException('Exception');
120-
$this->expectExceptionMessage("Table status for {$changelogTableName} is incorrect. Can`t fetch version id.");
121123
$this->model->setViewId('viewIdtest');
122124
$this->model->getVersion();
123125
}

0 commit comments

Comments
 (0)