[Pkg-owncloud-commits] [php-sabre-vobject] 18/25: Switched to a name that's a bit more like the rest of PHPUnit
David Prévot
taffit at moszumanska.debian.org
Thu Apr 7 01:41:30 UTC 2016
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository php-sabre-vobject.
commit 4987fee5cbe79b1f8e24c493706c4a8c520b2a32
Author: Evert Pot <me at evertpot.com>
Date: Wed Apr 6 00:59:01 2016 -0400
Switched to a name that's a bit more like the rest of PHPUnit
---
lib/PHPUnitAssertions.php | 2 +-
tests/VObject/BirthdayCalendarGeneratorTest.php | 28 +++++++++---------
tests/VObject/Component/VCalendarTest.php | 6 ++--
tests/VObject/FreeBusyGeneratorTest.php | 6 ++--
tests/VObject/ITip/BrokerTester.php | 8 +++--
tests/VObject/Parser/XmlTest.php | 9 +++---
tests/VObject/Property/ICalendar/RecurTest.php | 9 +++---
.../EventIterator/ExpandFloatingTimesTest.php | 9 +++---
.../Recur/EventIterator/IncorrectExpandTest.php | 7 +++--
.../Recur/EventIterator/MaxInstancesTest.php | 3 +-
.../Recur/EventIterator/MissingOverriddenTest.php | 7 +++--
.../Recur/EventIterator/OverrideFirstEventTest.php | 9 +++---
tests/VObject/TestCase.php | 9 ------
tests/VObject/VCardConverterTest.php | 34 ++++++++++++----------
14 files changed, 76 insertions(+), 70 deletions(-)
diff --git a/lib/PHPUnitAssertions.php b/lib/PHPUnitAssertions.php
index b36370d..87ec75e 100644
--- a/lib/PHPUnitAssertions.php
+++ b/lib/PHPUnitAssertions.php
@@ -32,7 +32,7 @@ trait PHPUnitAssertions {
* @param resource|string|Component $actual
* @param string $message
*/
- function assertVObjEquals($expected, $actual, $message = '') {
+ function assertVObjectEqualsVObject($expected, $actual, $message = '') {
$self = $this;
$getObj = function($input) use ($self) {
diff --git a/tests/VObject/BirthdayCalendarGeneratorTest.php b/tests/VObject/BirthdayCalendarGeneratorTest.php
index 090fd1e..1ce88d1 100644
--- a/tests/VObject/BirthdayCalendarGeneratorTest.php
+++ b/tests/VObject/BirthdayCalendarGeneratorTest.php
@@ -2,7 +2,9 @@
namespace Sabre\VObject;
-class BirthdayCalendarGeneratorTest extends TestCase {
+class BirthdayCalendarGeneratorTest extends \PHPUnit_Framework_TestCase {
+
+ use PHPUnitAssertions;
function testVcardStringWithValidBirthday() {
@@ -35,7 +37,7 @@ ICS;
$generator->setObjects($input);
$output = $generator->getResult();
- $this->assertVObjEquals(
+ $this->assertVObjectEqualsVObject(
$expected,
$output
);
@@ -94,7 +96,7 @@ ICS;
$generator->setObjects($input);
$output = $generator->getResult();
- $this->assertVObjEquals(
+ $this->assertVObjectEqualsVObject(
$expected,
$output
);
@@ -154,7 +156,7 @@ ICS;
$generator->setObjects($input);
$output = $generator->getResult();
- $this->assertVObjEquals(
+ $this->assertVObjectEqualsVObject(
$expected,
$output
);
@@ -194,7 +196,7 @@ ICS;
$generator->setObjects($input);
$output = $generator->getResult();
- $this->assertVObjEquals(
+ $this->assertVObjectEqualsVObject(
$expected,
$output
);
@@ -257,7 +259,7 @@ ICS;
$generator->setObjects($input);
$output = $generator->getResult();
- $this->assertVObjEquals(
+ $this->assertVObjectEqualsVObject(
$expected,
$output
);
@@ -295,7 +297,7 @@ ICS;
$generator->setObjects($input);
$output = $generator->getResult();
- $this->assertVObjEquals(
+ $this->assertVObjectEqualsVObject(
$expected,
$output
);
@@ -333,7 +335,7 @@ ICS;
$generator->setObjects($input);
$output = $generator->getResult();
- $this->assertVObjEquals(
+ $this->assertVObjectEqualsVObject(
$expected,
$output
);
@@ -362,7 +364,7 @@ ICS;
$generator->setObjects($input);
$output = $generator->getResult();
- $this->assertVObjEquals(
+ $this->assertVObjectEqualsVObject(
$expected,
$output
);
@@ -390,7 +392,7 @@ ICS;
$generator->setObjects($input);
$output = $generator->getResult();
- $this->assertVObjEquals(
+ $this->assertVObjectEqualsVObject(
$expected,
$output
);
@@ -429,7 +431,7 @@ ICS;
$generator->setFormat('%1$s\'s Geburtstag');
$output = $generator->getResult();
- $this->assertVObjEquals(
+ $this->assertVObjectEqualsVObject(
$expected,
$output
);
@@ -458,7 +460,7 @@ ICS;
$generator->setObjects($input);
$output = $generator->getResult();
- $this->assertVObjEquals(
+ $this->assertVObjectEqualsVObject(
$expected,
$output
);
@@ -550,7 +552,7 @@ ICS;
$generator->setObjects($input);
$output = $generator->getResult();
- $this->assertVObjEquals(
+ $this->assertVObjectEqualsVObject(
$expected,
$output
);
diff --git a/tests/VObject/Component/VCalendarTest.php b/tests/VObject/Component/VCalendarTest.php
index 4577967..abb387d 100644
--- a/tests/VObject/Component/VCalendarTest.php
+++ b/tests/VObject/Component/VCalendarTest.php
@@ -5,7 +5,9 @@ namespace Sabre\VObject\Component;
use DateTimeZone;
use Sabre\VObject;
-class VCalendarTest extends VObject\TestCase {
+class VCalendarTest extends \PHPUnit_Framework_TestCase {
+
+ use VObject\PHPUnitAssertions;
/**
* @dataProvider expandData
@@ -25,7 +27,7 @@ class VCalendarTest extends VObject\TestCase {
// This will normalize the output
$output = VObject\Reader::read($output)->serialize();
- $this->assertVObjEquals($output, $vcal->serialize());
+ $this->assertVObjectEqualsVObject($output, $vcal->serialize());
}
diff --git a/tests/VObject/FreeBusyGeneratorTest.php b/tests/VObject/FreeBusyGeneratorTest.php
index a675ef5..5632152 100644
--- a/tests/VObject/FreeBusyGeneratorTest.php
+++ b/tests/VObject/FreeBusyGeneratorTest.php
@@ -2,7 +2,9 @@
namespace Sabre\VObject;
-class FreeBusyGeneratorTest extends TestCase {
+class FreeBusyGeneratorTest extends \PHPUnit_Framework_TestCase {
+
+ use PHPUnitAssertions;
function testGeneratorBaseObject() {
@@ -80,7 +82,7 @@ END:VFREEBUSY
END:VCALENDAR
ICS;
- $this->assertVObjEquals($expected, $output);
+ $this->assertVObjectEqualsVObject($expected, $output);
}
diff --git a/tests/VObject/ITip/BrokerTester.php b/tests/VObject/ITip/BrokerTester.php
index 29dc530..6dbb517 100644
--- a/tests/VObject/ITip/BrokerTester.php
+++ b/tests/VObject/ITip/BrokerTester.php
@@ -11,7 +11,9 @@ use Sabre\VObject\Reader;
* @author Evert Pot (http://evertpot.com/)
* @license http://sabre.io/license/ Modified BSD License
*/
-abstract class BrokerTester extends \Sabre\VObject\TestCase {
+abstract class BrokerTester extends \PHPUnit_Framework_TestCase {
+
+ use \Sabre\VObject\PHPUnitAssertions;
function parse($oldMessage, $newMessage, $expected = [], $currentUser = 'mailto:one at example.org') {
@@ -27,7 +29,7 @@ abstract class BrokerTester extends \Sabre\VObject\TestCase {
foreach ($ex as $key => $val) {
if ($key === 'message') {
- $this->assertVObjEquals(
+ $this->assertVObjectEqualsVObject(
$val,
$message->message->serialize()
);
@@ -85,7 +87,7 @@ abstract class BrokerTester extends \Sabre\VObject\TestCase {
return;
}
- $this->assertVObjEquals(
+ $this->assertVObjectEqualsVObject(
$expected,
$result
);
diff --git a/tests/VObject/Parser/XmlTest.php b/tests/VObject/Parser/XmlTest.php
index f1921d7..d45616d 100644
--- a/tests/VObject/Parser/XmlTest.php
+++ b/tests/VObject/Parser/XmlTest.php
@@ -3,9 +3,10 @@
namespace Sabre\VObject\Parser;
use Sabre\VObject;
-use Sabre\VObject\TestCase;
-class XmlTest extends TestCase {
+class XmlTest extends \PHPUnit_Framework_TestCase {
+
+ use VObject\PHPUnitAssertions;
function testRFC6321Example1() {
@@ -211,7 +212,7 @@ meetings.</text>
XML;
$component = VObject\Reader::readXML($xml);
- $this->assertVObjEquals(
+ $this->assertVObjectEqualsVObject(
'BEGIN:VCALENDAR' . "\n" .
'VERSION:2.0' . "\n" .
'PRODID:-//Example Inc.//Example Client//EN' . "\n" .
@@ -2873,7 +2874,7 @@ XML
protected function assertXMLEqualsToMimeDir($xml, $mimedir) {
$component = VObject\Reader::readXML($xml);
- $this->assertVObjEquals($mimedir, $component);
+ $this->assertVObjectEqualsVObject($mimedir, $component);
}
diff --git a/tests/VObject/Property/ICalendar/RecurTest.php b/tests/VObject/Property/ICalendar/RecurTest.php
index d34214b..ed11b82 100644
--- a/tests/VObject/Property/ICalendar/RecurTest.php
+++ b/tests/VObject/Property/ICalendar/RecurTest.php
@@ -4,9 +4,10 @@ namespace Sabre\VObject\Property\ICalendar;
use Sabre\VObject\Component\VCalendar;
use Sabre\VObject\Reader;
-use Sabre\VObject\TestCase;
-class RecurTest extends TestCase {
+class RecurTest extends \PHPUnit_Framework_TestCase {
+
+ use \Sabre\VObject\PHPUnitAssertions;
function testParts() {
@@ -139,7 +140,7 @@ END:VEVENT
END:VCALENDAR
';
- $this->assertVObjEquals(
+ $this->assertVObjectEqualsVObject(
$expected,
$vcal
);
@@ -189,7 +190,7 @@ END:VEVENT
END:VCALENDAR
';
- $this->assertVObjEquals(
+ $this->assertVObjectEqualsVObject(
$expected,
$vcal
);
diff --git a/tests/VObject/Recur/EventIterator/ExpandFloatingTimesTest.php b/tests/VObject/Recur/EventIterator/ExpandFloatingTimesTest.php
index b2b2e71..3d7b6f1 100644
--- a/tests/VObject/Recur/EventIterator/ExpandFloatingTimesTest.php
+++ b/tests/VObject/Recur/EventIterator/ExpandFloatingTimesTest.php
@@ -5,9 +5,10 @@ namespace Sabre\VObject\Recur\EventIterator;
use DateTime;
use DateTimeZone;
use Sabre\VObject\Reader;
-use Sabre\VObject\TestCase;
-class ExpandFloatingTimesTest extends TestCase {
+class ExpandFloatingTimesTest extends \PHPUnit_Framework_TestCase {
+
+ use \Sabre\VObject\PHPUnitAssertions;
function testExpand() {
@@ -57,7 +58,7 @@ END:VEVENT
END:VCALENDAR
ICS;
- $this->assertVObjEquals($output, $vcal);
+ $this->assertVObjectEqualsVObject($output, $vcal);
}
@@ -114,7 +115,7 @@ END:VEVENT
END:VCALENDAR
ICS;
- $this->assertVObjEquals($output, $vcal);
+ $this->assertVObjectEqualsVObject($output, $vcal);
}
diff --git a/tests/VObject/Recur/EventIterator/IncorrectExpandTest.php b/tests/VObject/Recur/EventIterator/IncorrectExpandTest.php
index dcd91f9..8227829 100644
--- a/tests/VObject/Recur/EventIterator/IncorrectExpandTest.php
+++ b/tests/VObject/Recur/EventIterator/IncorrectExpandTest.php
@@ -4,12 +4,13 @@ namespace Sabre\VObject\Recur\EventIterator;
use DateTime;
use Sabre\VObject\Reader;
-use Sabre\VObject\TestCase;
/**
* This is a unittest for Issue #53.
*/
-class IncorrectExpandTest extends TestCase {
+class IncorrectExpandTest extends \PHPUnit_Framework_TestCase {
+
+ use \Sabre\VObject\PHPUnitAssertions;
function testExpand() {
@@ -54,7 +55,7 @@ END:VEVENT
END:VCALENDAR
ICS;
- $this->assertVObjEquals($output, $vcal);
+ $this->assertVObjectEqualsVObject($output, $vcal);
}
diff --git a/tests/VObject/Recur/EventIterator/MaxInstancesTest.php b/tests/VObject/Recur/EventIterator/MaxInstancesTest.php
index 5a09b53..685625b 100644
--- a/tests/VObject/Recur/EventIterator/MaxInstancesTest.php
+++ b/tests/VObject/Recur/EventIterator/MaxInstancesTest.php
@@ -4,10 +4,9 @@ namespace Sabre\VObject\Recur\EventIterator;
use Sabre\VObject\Reader;
use Sabre\VObject\Settings;
-use Sabre\VObject\TestCase;
use DateTime;
-class MaxInstancesTest extends TestCase {
+class MaxInstancesTest extends \PHPUnit_Framework_TestCase {
/**
* @expectedException \Sabre\VObject\Recur\MaxInstancesExceededException
diff --git a/tests/VObject/Recur/EventIterator/MissingOverriddenTest.php b/tests/VObject/Recur/EventIterator/MissingOverriddenTest.php
index 00a1a08..fc8c518 100644
--- a/tests/VObject/Recur/EventIterator/MissingOverriddenTest.php
+++ b/tests/VObject/Recur/EventIterator/MissingOverriddenTest.php
@@ -4,9 +4,10 @@ namespace Sabre\VObject\Recur\EventIterator;
use DateTime;
use Sabre\VObject\Reader;
-use Sabre\VObject\TestCase;
-class MissingOverriddenTest extends TestCase {
+class MissingOverriddenTest extends \PHPUnit_Framework_TestCase {
+
+ use \Sabre\VObject\PHPUnitAssertions;
function testExpand() {
@@ -54,7 +55,7 @@ SUMMARY:B
END:VEVENT
END:VCALENDAR
ICS;
- $this->assertVObjEquals($output, $vcal);
+ $this->assertVObjectEqualsVObject($output, $vcal);
}
diff --git a/tests/VObject/Recur/EventIterator/OverrideFirstEventTest.php b/tests/VObject/Recur/EventIterator/OverrideFirstEventTest.php
index 22f7f61..abe987d 100644
--- a/tests/VObject/Recur/EventIterator/OverrideFirstEventTest.php
+++ b/tests/VObject/Recur/EventIterator/OverrideFirstEventTest.php
@@ -3,10 +3,11 @@
namespace Sabre\VObject\RecurrenceIterator;
use Sabre\VObject\Reader;
-use Sabre\VObject\TestCase;
use DateTime;
-class OverrideFirstEventTest extends TestCase {
+class OverrideFirstEventTest extends \PHPUnit_Framework_TestCase {
+
+ use \Sabre\VObject\PHPUnitAssertions;
function testOverrideFirstEvent() {
@@ -67,7 +68,7 @@ END:VEVENT
END:VCALENDAR
ICS;
- $this->assertVObjEquals(
+ $this->assertVObjectEqualsVObject(
$expected,
$vcal
);
@@ -111,7 +112,7 @@ END:VEVENT
END:VCALENDAR
ICS;
- $this->assertVObjEquals(
+ $this->assertVObjectEqualsVObject(
$expected,
$vcal
);
diff --git a/tests/VObject/TestCase.php b/tests/VObject/TestCase.php
deleted file mode 100644
index af95387..0000000
--- a/tests/VObject/TestCase.php
+++ /dev/null
@@ -1,9 +0,0 @@
-<?php
-
-namespace Sabre\VObject;
-
-class TestCase extends \PHPUnit_Framework_TestCase {
-
- use PHPUnitAssertions;
-
-}
diff --git a/tests/VObject/VCardConverterTest.php b/tests/VObject/VCardConverterTest.php
index 508dcae..77fc37d 100644
--- a/tests/VObject/VCardConverterTest.php
+++ b/tests/VObject/VCardConverterTest.php
@@ -2,7 +2,9 @@
namespace Sabre\VObject;
-class VCardConverterTest extends TestCase {
+class VCardConverterTest extends \PHPUnit_Framework_TestCase {
+
+ use \Sabre\VObject\PHPUnitAssertions;
function testConvert30to40() {
@@ -40,7 +42,7 @@ OUT;
$vcard = Reader::read($input);
$vcard = $vcard->convert(Document::VCARD40);
- $this->assertVObjEquals(
+ $this->assertVObjectEqualsVObject(
$output,
$vcard
);
@@ -78,7 +80,7 @@ OUT;
$vcard = Reader::read($input);
$vcard = $vcard->convert(Document::VCARD40);
- $this->assertVObjEquals(
+ $this->assertVObjectEqualsVObject(
$output,
$vcard
);
@@ -117,7 +119,7 @@ OUT;
$vcard = Reader::read($input);
$vcard = $vcard->convert(Document::VCARD40);
- $this->assertVObjEquals(
+ $this->assertVObjectEqualsVObject(
$output,
$vcard
);
@@ -157,7 +159,7 @@ OUT;
$vcard = Reader::read($input);
$vcard = $vcard->convert(Document::VCARD30);
- $this->assertVObjEquals(
+ $this->assertVObjectEqualsVObject(
$output,
$vcard
);
@@ -198,7 +200,7 @@ OUT;
$vcard = Reader::read($input);
$vcard = $vcard->convert(Document::VCARD30);
- $this->assertVObjEquals(
+ $this->assertVObjectEqualsVObject(
$output,
$vcard
);
@@ -227,7 +229,7 @@ OUT;
$vcard = Reader::read($input);
$vcard = $vcard->convert(Document::VCARD40);
- $this->assertVObjEquals(
+ $this->assertVObjectEqualsVObject(
$output,
$vcard
);
@@ -244,7 +246,7 @@ OUT;
$vcard = Reader::read($input);
$vcard = $vcard->convert(Document::VCARD30);
- $this->assertVObjEquals(
+ $this->assertVObjectEqualsVObject(
$output,
$vcard
);
@@ -273,7 +275,7 @@ OUT;
$vcard = Reader::read($input);
$vcard = $vcard->convert(Document::VCARD40);
- $this->assertVObjEquals(
+ $this->assertVObjectEqualsVObject(
$output,
$vcard
);
@@ -290,7 +292,7 @@ OUT;
$vcard = Reader::read($input);
$vcard = $vcard->convert(Document::VCARD30);
- $this->assertVObjEquals(
+ $this->assertVObjectEqualsVObject(
$output,
$vcard
);
@@ -363,7 +365,7 @@ OUT;
$vcard = Reader::read($input);
$vcard = $vcard->convert(Document::VCARD30);
- $this->assertVObjEquals(
+ $this->assertVObjectEqualsVObject(
$output,
$vcard
);
@@ -379,7 +381,7 @@ OUT;
$vcard = Reader::read($input);
$vcard = $vcard->convert(Document::VCARD40);
- $this->assertVObjEquals(
+ $this->assertVObjectEqualsVObject(
$output,
$vcard
);
@@ -409,7 +411,7 @@ OUT;
$vcard = Reader::read($input);
$vcard = $vcard->convert(Document::VCARD30);
- $this->assertVObjEquals(
+ $this->assertVObjectEqualsVObject(
$output,
$vcard
);
@@ -426,7 +428,7 @@ OUT;
$vcard = Reader::read($input);
$vcard = $vcard->convert(Document::VCARD40);
- $this->assertVObjEquals(
+ $this->assertVObjectEqualsVObject(
$output,
$vcard
);
@@ -464,7 +466,7 @@ OUT;
$vcard = Reader::read($input);
$vcard = $vcard->convert(Document::VCARD30);
- $this->assertVObjEquals(
+ $this->assertVObjectEqualsVObject(
$output,
$vcard
);
@@ -481,7 +483,7 @@ OUT;
$vcard = Reader::read($input);
$vcard = $vcard->convert(Document::VCARD40);
- $this->assertVObjEquals(
+ $this->assertVObjectEqualsVObject(
$output,
$vcard
);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-php/php-sabre-vobject.git
More information about the Pkg-owncloud-commits
mailing list