aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre/dav/tests/Sabre/CalDAV/CalendarObjectTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/sabre/dav/tests/Sabre/CalDAV/CalendarObjectTest.php')
-rw-r--r--vendor/sabre/dav/tests/Sabre/CalDAV/CalendarObjectTest.php26
1 files changed, 9 insertions, 17 deletions
diff --git a/vendor/sabre/dav/tests/Sabre/CalDAV/CalendarObjectTest.php b/vendor/sabre/dav/tests/Sabre/CalDAV/CalendarObjectTest.php
index d6073514f..b7eb4539e 100644
--- a/vendor/sabre/dav/tests/Sabre/CalDAV/CalendarObjectTest.php
+++ b/vendor/sabre/dav/tests/Sabre/CalDAV/CalendarObjectTest.php
@@ -4,8 +4,6 @@ declare(strict_types=1);
namespace Sabre\CalDAV;
-require_once 'Sabre/CalDAV/TestUtil.php';
-
class CalendarObjectTest extends \PHPUnit\Framework\TestCase
{
/**
@@ -18,7 +16,7 @@ class CalendarObjectTest extends \PHPUnit\Framework\TestCase
protected $calendar;
protected $principalBackend;
- public function setup()
+ public function setup(): void
{
$this->backend = TestUtil::getBackend();
@@ -27,7 +25,7 @@ class CalendarObjectTest extends \PHPUnit\Framework\TestCase
$this->calendar = new Calendar($this->backend, $calendars[0]);
}
- public function teardown()
+ public function teardown(): void
{
unset($this->calendar);
unset($this->backend);
@@ -38,17 +36,15 @@ class CalendarObjectTest extends \PHPUnit\Framework\TestCase
$children = $this->calendar->getChildren();
$this->assertTrue($children[0] instanceof CalendarObject);
- $this->assertInternalType('string', $children[0]->getName());
- $this->assertInternalType('string', $children[0]->get());
- $this->assertInternalType('string', $children[0]->getETag());
+ $this->assertIsString($children[0]->getName());
+ $this->assertIsString($children[0]->get());
+ $this->assertIsString($children[0]->getETag());
$this->assertEquals('text/calendar; charset=utf-8', $children[0]->getContentType());
}
- /**
- * @expectedException \InvalidArgumentException
- */
public function testInvalidArg1()
{
+ $this->expectException('InvalidArgumentException');
$obj = new CalendarObject(
new Backend\Mock([], []),
[],
@@ -56,11 +52,9 @@ class CalendarObjectTest extends \PHPUnit\Framework\TestCase
);
}
- /**
- * @expectedException \InvalidArgumentException
- */
public function testInvalidArg2()
{
+ $this->expectException('InvalidArgumentException');
$obj = new CalendarObject(
new Backend\Mock([], []),
[],
@@ -137,7 +131,7 @@ class CalendarObjectTest extends \PHPUnit\Framework\TestCase
$obj = $children[0];
$size = $obj->getSize();
- $this->assertInternalType('int', $size);
+ $this->assertIsInt($size);
}
public function testGetOwner()
@@ -219,11 +213,9 @@ class CalendarObjectTest extends \PHPUnit\Framework\TestCase
$this->assertEquals($expected, $calendarObject->getACL());
}
- /**
- * @expectedException \Sabre\DAV\Exception\Forbidden
- */
public function testSetACL()
{
+ $this->expectException('Sabre\DAV\Exception\Forbidden');
$children = $this->calendar->getChildren();
$this->assertTrue($children[0] instanceof CalendarObject);