Skip to content

Commit

Permalink
#220 CollectionTest now uses Opus\Model2\CollectionRole and adopts co…
Browse files Browse the repository at this point in the history
…de to PHPUnit v6
  • Loading branch information
extracts committed Feb 11, 2022
1 parent 8c603ab commit 8cb97aa
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions tests/Opus/CollectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@

use Exception;
use InvalidArgumentException;
use Opus\CollectionRole;
use Opus\Config;
use Opus\Document;
use Opus\Model\NotFoundException;
use Opus\Model\Xml\Cache;
use Opus\Model2\Collection;
use Opus\Model2\CollectionRole;
use OpusTest\Model\Plugin\AbstractPluginMock;
use OpusTest\TestAsset\NestedSetValidator;
use OpusTest\TestAsset\TestCase;
Expand Down Expand Up @@ -123,7 +123,7 @@ public function testDeleteNoChildren()
$collectionId = $this->object->getId();
$this->object->delete();

$this->setExpectedException(NotFoundException::class);
$this->expectException(NotFoundException::class);
Collection::get($collectionId);
}

Expand All @@ -144,6 +144,8 @@ public function testGetTheme()

/**
* Test if virtual field "GetOaiName" contains the value of "OaiSubset".
*
* TODO: Is this test correct?
*/
public function testGetOaiName()
{
Expand Down Expand Up @@ -1222,7 +1224,8 @@ public function testSortChildrenBySpecifiedOrderBadId()

$this->assertCount(7, $children);

$this->setExpectedException(InvalidArgumentException::class, 'is no child of');
$this->expectException(InvalidArgumentException::class);
$this->expectExceptionMessage('is no child of');

$root->applySortOrderOfChildren([4, 11, 3, 16, 2, 8, 13]);
}
Expand Down

0 comments on commit 8cb97aa

Please sign in to comment.