Skip to content
This repository was archived by the owner on Apr 23, 2024. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
],
"require": {
"php": ">=5.3.3",
"swiftmailer/swiftmailer": "^5.4"
"swiftmailer/swiftmailer": "^6.0"
},
"autoload": {
"classmap": [
Expand Down
21 changes: 21 additions & 0 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- http://phpunit.de/manual/4.1/en/appendixes.configuration.html -->
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.1/phpunit.xsd"
backupGlobals="false"
colors="true"
bootstrap="vendor/autoload.php"
>
<testsuites>
<testsuite name="Project Test Suite">
<directory>tests</directory>
</testsuite>
</testsuites>
<php>
</php>
<filter>
<whitelist>
<directory>src</directory>
</whitelist>
</filter>
</phpunit>
4 changes: 2 additions & 2 deletions src/Swift_Calendar.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function setMethod($method) {
throw new InvalidArgumentException('Method must be PUBLISH or REQUEST');
}

$this->_setHeaderParameter('Content-Type', 'method', $method);
$this->setHeaderParameter('Content-Type', 'method', $method);

return $this;
}
Expand All @@ -53,7 +53,7 @@ public function setMethod($method) {
* @return string
*/
public function getMethod() {
return $this->_getHeaderParameter('Content-Type', 'method');
return $this->getHeaderParameter('Content-Type', 'method');
}

/**
Expand Down
13 changes: 13 additions & 0 deletions tests/Swift_CalendarTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

class Swift_CalendarTest extends \PHPUnit\Framework\TestCase
{

public function testDefaultMethodIsRequest()
{
$calendar = new Swift_Calendar();

self::assertEquals('REQUEST', $calendar->getMethod());
}

}