Skip to content

Commit

Permalink
use git reflog to view all credentials (so removed all credentials)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeroendesloovere committed Jun 27, 2017
1 parent 6698d15 commit 2a0b7dc
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 47 deletions.
2 changes: 0 additions & 2 deletions src/VCard.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 <[email protected]>
*/
class VCard
{
Expand Down
2 changes: 0 additions & 2 deletions src/VCardException.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@

/**
* VCard Exception PHP Class.
*
* @author Jeroen Desloovere <[email protected]>
*/
class VCardException extends \Exception
{
Expand Down
22 changes: 3 additions & 19 deletions src/VCardParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,10 @@
namespace JeroenDesloovere\VCard;

/*
* Copyright 2010 Thomas Schaaf <[email protected]>
* 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 <[email protected]>
* 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;
Expand All @@ -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 <[email protected]>
* @author ruzicka.jan
* @author Wouter Admiraal <[email protected]>
*/
class VCardParser implements Iterator
{
Expand Down
2 changes: 0 additions & 2 deletions tests/VCardExceptionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@

/**
* VCard Exception Test.
*
* @author Jeroen Desloovere <[email protected]>
*/
class VCardExceptionTest extends \PHPUnit_Framework_TestCase
{
Expand Down
38 changes: 18 additions & 20 deletions tests/VCardParserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@

/**
* Unit tests for our VCard parser.
*
* @author Wouter Admiraal <[email protected]>
*/
class VCardParserTest extends \PHPUnit_Framework_TestCase
{
Expand All @@ -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()
Expand All @@ -53,7 +51,7 @@ public function testAddress()
'WORK;POSTAL'
);
$vcard->addAddress(
"Wouter Admiraal",
"Jeroen Desloovere",
"(extended info, again)",
"25th Some Address",
"Townsville",
Expand All @@ -63,7 +61,7 @@ public function testAddress()
'WORK;PERSONAL'
);
$vcard->addAddress(
"Johannes Admiraal",
"Georges Desloovere",
"(extended info, again, again)",
"26th Some Address",
"Townsville-South",
Expand All @@ -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",
Expand All @@ -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",
Expand Down Expand Up @@ -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');
Expand Down Expand Up @@ -237,15 +235,15 @@ public function testVcardDB()
{
$db = '';
$vcard = new VCard();
$vcard->addName("Admiraal", "Wouter");
$vcard->addName("Desloovere", "Jeroen");
$db .= $vcard->buildVCard();

$vcard = new VCard();
$vcard->addName("Lorem", "Ipsum");
$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");
}

Expand All @@ -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();
Expand All @@ -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");
}
}

Expand All @@ -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], '[email protected]');
}

Expand Down
2 changes: 0 additions & 2 deletions tests/VCardTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@

/**
* This class will test our VCard PHP Class which can generate VCards.
*
* @author Jeroen Desloovere <[email protected]>
*/
class VCardTest extends \PHPUnit_Framework_TestCase
{
Expand Down

0 comments on commit 2a0b7dc

Please sign in to comment.