Skip to content

Commit

Permalink
remove unused frunction in ics_helper + add test #35
Browse files Browse the repository at this point in the history
  • Loading branch information
MathieuNls committed Feb 3, 2016
1 parent bf9dcb5 commit 732e251
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
4 changes: 0 additions & 4 deletions application/helpers/ics_helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,6 @@
function dateToCal($timestamp) {
return date('Ymd\THis\Z', $timestamp);
}
// Escapes a string of characters
function escapeString($string) {
return preg_replace('/([\,;])/', '\\\$1', $string);
}

function generateBase64Ics($datestart, $dateend, $attendeeName,
$attendeeEmail, $summary, $uid){
Expand Down
19 changes: 19 additions & 0 deletions application/tests/helpers/Ics_helper_test.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php

class Ics_helper_test extends TestCase {

public function setUp() {
$this->CI = &get_instance();

$this->CI->load->helper("ics_helper");
}

public function test_generateBase64Ics(){
$this->assertEquals(
true,
is_string(generateBase64Ics(1454508967, 1454508967, "Mathieu", "[email protected]", "Summary", "iqzd"))
);
}

}
?>

0 comments on commit 732e251

Please sign in to comment.