diff --git a/src/VCard.php b/src/VCard.php index 6216c95..d388b14 100644 --- a/src/VCard.php +++ b/src/VCard.php @@ -13,8 +13,6 @@ /** * VCard PHP Class to generate .vcard files and save them to a file or output as a download. - * - * @author Jeroen Desloovere */ class VCard { diff --git a/src/VCardException.php b/src/VCardException.php index 0cca59e..051ae7c 100644 --- a/src/VCardException.php +++ b/src/VCardException.php @@ -11,8 +11,6 @@ /** * VCard Exception PHP Class. - * - * @author Jeroen Desloovere */ class VCardException extends \Exception { diff --git a/src/VCardParser.php b/src/VCardParser.php index 0aa5325..e6f94b2 100644 --- a/src/VCardParser.php +++ b/src/VCardParser.php @@ -3,22 +3,10 @@ namespace JeroenDesloovere\VCard; /* - * Copyright 2010 Thomas Schaaf + * This file is part of the VCard PHP Class from Jeroen Desloovere. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * Changes by: Wouter Admiraal - * Original code is available at: http://code.google.com/p/zendvcard/ + * For the full copyright and license information, please view the license + * file that was distributed with this source code. */ use Iterator; @@ -29,10 +17,6 @@ * This class is heavily based on the Zendvcard project (seemingly abandoned), * which is licensed under the Apache 2.0 license. * More information can be found at https://code.google.com/archive/p/zendvcard/ - * - * @author Thomas Schaaf - * @author ruzicka.jan - * @author Wouter Admiraal */ class VCardParser implements Iterator { diff --git a/tests/VCardExceptionTest.php b/tests/VCardExceptionTest.php index 741a80e..2e04b4e 100644 --- a/tests/VCardExceptionTest.php +++ b/tests/VCardExceptionTest.php @@ -14,8 +14,6 @@ /** * VCard Exception Test. - * - * @author Jeroen Desloovere */ class VCardExceptionTest extends \PHPUnit_Framework_TestCase { diff --git a/tests/VCardParserTest.php b/tests/VCardParserTest.php index 90ca0a1..c738eca 100644 --- a/tests/VCardParserTest.php +++ b/tests/VCardParserTest.php @@ -7,8 +7,6 @@ /** * Unit tests for our VCard parser. - * - * @author Wouter Admiraal */ class VCardParserTest extends \PHPUnit_Framework_TestCase { @@ -24,11 +22,11 @@ public function testOutOfRangeException() public function testSimpleVcard() { $vcard = new VCard(); - $vcard->addName("Admiraal", "Wouter"); + $vcard->addName("Desloovere", "Jeroen"); $parser = new VCardParser($vcard->buildVCard()); - $this->assertEquals($parser->getCardAtIndex(0)->firstname, "Wouter"); - $this->assertEquals($parser->getCardAtIndex(0)->lastname, "Admiraal"); - $this->assertEquals($parser->getCardAtIndex(0)->fullname, "Wouter Admiraal"); + $this->assertEquals($parser->getCardAtIndex(0)->firstname, "Jeroen"); + $this->assertEquals($parser->getCardAtIndex(0)->lastname, "Desloovere"); + $this->assertEquals($parser->getCardAtIndex(0)->fullname, "Jeroen Desloovere"); } public function testBDay() @@ -53,7 +51,7 @@ public function testAddress() 'WORK;POSTAL' ); $vcard->addAddress( - "Wouter Admiraal", + "Jeroen Desloovere", "(extended info, again)", "25th Some Address", "Townsville", @@ -63,7 +61,7 @@ public function testAddress() 'WORK;PERSONAL' ); $vcard->addAddress( - "Johannes Admiraal", + "Georges Desloovere", "(extended info, again, again)", "26th Some Address", "Townsville-South", @@ -83,7 +81,7 @@ public function testAddress() 'country' => "Gitland", )); $this->assertEquals($parser->getCardAtIndex(0)->address['WORK;PERSONAL'][0], (object) array( - 'name' => "Wouter Admiraal", + 'name' => "Jeroen Desloovere", 'extended' => "(extended info, again)", 'street' => "25th Some Address", 'city' => "Townsville", @@ -92,7 +90,7 @@ public function testAddress() 'country' => "Europe (is a country, right?)", )); $this->assertEquals($parser->getCardAtIndex(0)->address['WORK;PERSONAL'][1], (object) array( - 'name' => "Johannes Admiraal", + 'name' => "Georges Desloovere", 'extended' => "(extended info, again, again)", 'street' => "26th Some Address", 'city' => "Townsville-South", @@ -143,12 +141,12 @@ public function testOrganization() public function testUrl() { $vcard = new VCard(); - $vcard->addUrl('http://example.com'); + $vcard->addUrl('http://www.jeroendesloovere.be'); $vcard->addUrl('http://home.example.com', 'HOME'); $vcard->addUrl('http://work1.example.com', 'PREF;WORK'); $vcard->addUrl('http://work2.example.com', 'PREF;WORK'); $parser = new VCardParser($vcard->buildVCard()); - $this->assertEquals($parser->getCardAtIndex(0)->url['default'][0], 'http://example.com'); + $this->assertEquals($parser->getCardAtIndex(0)->url['default'][0], 'http://www.jeroendesloovere.be'); $this->assertEquals($parser->getCardAtIndex(0)->url['HOME'][0], 'http://home.example.com'); $this->assertEquals($parser->getCardAtIndex(0)->url['PREF;WORK'][0], 'http://work1.example.com'); $this->assertEquals($parser->getCardAtIndex(0)->url['PREF;WORK'][1], 'http://work2.example.com'); @@ -237,7 +235,7 @@ public function testVcardDB() { $db = ''; $vcard = new VCard(); - $vcard->addName("Admiraal", "Wouter"); + $vcard->addName("Desloovere", "Jeroen"); $db .= $vcard->buildVCard(); $vcard = new VCard(); @@ -245,7 +243,7 @@ public function testVcardDB() $db .= $vcard->buildVCard(); $parser = new VCardParser($db); - $this->assertEquals($parser->getCardAtIndex(0)->fullname, "Wouter Admiraal"); + $this->assertEquals($parser->getCardAtIndex(0)->fullname, "Jeroen Desloovere"); $this->assertEquals($parser->getCardAtIndex(1)->fullname, "Ipsum Lorem"); } @@ -254,7 +252,7 @@ public function testIteration() // Prepare a VCard DB. $db = ''; $vcard = new VCard(); - $vcard->addName("Admiraal", "Wouter"); + $vcard->addName("Desloovere", "Jeroen"); $db .= $vcard->buildVCard(); $vcard = new VCard(); @@ -263,7 +261,7 @@ public function testIteration() $parser = new VCardParser($db); foreach ($parser as $i => $card) { - $this->assertEquals($card->fullname, $i == 0 ? "Wouter Admiraal" : "Ipsum Lorem"); + $this->assertEquals($card->fullname, $i == 0 ? "Jeroen Desloovere" : "Ipsum Lorem"); } } @@ -272,12 +270,12 @@ public function testFromFile() $parser = VCardParser::parseFromFile(__DIR__ . '/example.vcf'); // Use this opportunity to test fetching all cards directly. $cards = $parser->getCards(); - $this->assertEquals($cards[0]->firstname, "Wouter"); - $this->assertEquals($cards[0]->lastname, "Admiraal"); - $this->assertEquals($cards[0]->fullname, "Wouter Admiraal"); + $this->assertEquals($cards[0]->firstname, "Jeroen"); + $this->assertEquals($cards[0]->lastname, "Desloovere"); + $this->assertEquals($cards[0]->fullname, "Jeroen Desloovere"); // Check the parsing of grouped items as well, which are present in the // example file. - $this->assertEquals($cards[0]->url['default'][0], 'http://example.com'); + $this->assertEquals($cards[0]->url['default'][0], 'http://www.jeroendesloovere.be'); $this->assertEquals($cards[0]->email['INTERNET'][0], 'site@example.com'); } diff --git a/tests/VCardTest.php b/tests/VCardTest.php index 5fb1a51..9fb786f 100644 --- a/tests/VCardTest.php +++ b/tests/VCardTest.php @@ -16,8 +16,6 @@ /** * This class will test our VCard PHP Class which can generate VCards. - * - * @author Jeroen Desloovere */ class VCardTest extends \PHPUnit_Framework_TestCase {