phpunit compatibility
This commit is contained in:
parent
9c81d85bb7
commit
5c61a442a0
@ -329,22 +329,16 @@ class ModelTest extends TestCase
|
|||||||
$paste->get();
|
$paste->get();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @expectedException Exception
|
|
||||||
* @expectedExceptionCode 75
|
|
||||||
*/
|
|
||||||
public function testInvalidPasteFormat()
|
public function testInvalidPasteFormat()
|
||||||
{
|
{
|
||||||
$pasteData = Helper::getPastePost();
|
$pasteData = Helper::getPastePost();
|
||||||
$pasteData['adata'][1] = 'format does not exist';
|
$pasteData['adata'][1] = 'format does not exist';
|
||||||
$paste = $this->_model->getPaste();
|
$paste = $this->_model->getPaste();
|
||||||
|
$this->expectException(Exception::class);
|
||||||
|
$this->expectExceptionCode(75);
|
||||||
$paste->setData($pasteData);
|
$paste->setData($pasteData);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @expectedException Exception
|
|
||||||
* @expectedExceptionCode 60
|
|
||||||
*/
|
|
||||||
public function testInvalidPasteId()
|
public function testInvalidPasteId()
|
||||||
{
|
{
|
||||||
$this->expectException(Exception::class);
|
$this->expectException(Exception::class);
|
||||||
|
Loading…
Reference in New Issue
Block a user