"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "vendor/sabre/vobject/tests/VObject/ITip/BrokerTester.php" between
sabredav-3.1.2.zip and sabredav-3.1.3.zip

About: SabreDAV allows you to easily add WebDAV support to a PHP application.

BrokerTester.php  (sabredav-3.1.2):BrokerTester.php  (sabredav-3.1.3)
skipping to change at line 14 skipping to change at line 14
use Sabre\VObject\Reader; use Sabre\VObject\Reader;
/** /**
* Utilities for testing the broker * Utilities for testing the broker
* *
* @copyright Copyright (C) fruux GmbH (https://fruux.com/) * @copyright Copyright (C) fruux GmbH (https://fruux.com/)
* @author Evert Pot (http://evertpot.com/) * @author Evert Pot (http://evertpot.com/)
* @license http://sabre.io/license/ Modified BSD License * @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 = 'mai lto:one@example.org') { function parse($oldMessage, $newMessage, $expected = [], $currentUser = 'mai lto:one@example.org') {
$broker = new Broker(); $broker = new Broker();
$result = $broker->parseEvent($newMessage, $currentUser, $oldMessage); $result = $broker->parseEvent($newMessage, $currentUser, $oldMessage);
$this->assertEquals(count($expected), count($result)); $this->assertEquals(count($expected), count($result));
foreach ($expected as $index => $ex) { foreach ($expected as $index => $ex) {
$message = $result[$index]; $message = $result[$index];
foreach ($ex as $key => $val) { foreach ($ex as $key => $val) {
if ($key === 'message') { if ($key === 'message') {
$this->assertVObjEquals( $this->assertVObjectEqualsVObject(
$val, $val,
$message->message->serialize() $message->message->serialize()
); );
} else { } else {
$this->assertEquals($val, $message->$key); $this->assertEquals($val, $message->$key);
} }
} }
} }
skipping to change at line 88 skipping to change at line 90
$existingObject = Reader::read($existingObject); $existingObject = Reader::read($existingObject);
} }
$result = $broker->processMessage($message, $existingObject); $result = $broker->processMessage($message, $existingObject);
if (is_null($expected)) { if (is_null($expected)) {
$this->assertTrue(!$result); $this->assertTrue(!$result);
return; return;
} }
$this->assertVObjEquals( $this->assertVObjectEqualsVObject(
$expected, $expected,
$result $result
); );
} }
} }
 End of changes. 3 change blocks. 
3 lines changed or deleted 5 lines changed or added

Home  |  About  |  All  |  Newest  |  Fossies Dox  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTPS