Skip to content

Commit

Permalink
Fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
slusarz committed Jan 7, 2014
1 parent 1fcde4e commit 2de2274
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
6 changes: 3 additions & 3 deletions framework/Compress/test/Horde/Compress/TnefTest.php
Expand Up @@ -17,7 +17,7 @@ class Horde_Compress_TnefTest extends Horde_Test_Case
public function testMeetingInvitation()
{
$tnef = Horde_Compress::factory('Tnef');
$data = base64_decode(file_get_contents('fixtures/TnefMeetingRequest.txt'));
$data = base64_decode(file_get_contents(__DIR__ . '/fixtures/TnefMeetingRequest.txt'));
$tnef_data = $tnef->decompress($data);
$this->assertEquals($tnef_data[0]['type'], 'text');
$this->assertEquals($tnef_data[0]['subtype'], 'calendar');
Expand All @@ -26,7 +26,7 @@ public function testMeetingInvitation()

public function testAttachments()
{
$data = base64_decode(file_get_contents('fixtures/TnefAttachments.txt'));
$data = base64_decode(file_get_contents(__DIR__ . '/fixtures/TnefAttachments.txt'));
$tnef = Horde_Compress::factory('Tnef');
$tnef_data = $tnef->decompress($data);
$this->assertEquals($tnef_data[0]['type'], 'application');
Expand All @@ -37,7 +37,7 @@ public function testAttachments()

public function testMultipleAttachments()
{
$data = base64_decode(file_get_contents('fixtures/TnefAttachmentsMultiple.txt'));
$data = base64_decode(file_get_contents(__DIR__ . '/fixtures/TnefAttachmentsMultiple.txt'));
$tnef = Horde_Compress::factory('Tnef');
$tnef_data = $tnef->decompress($data);
$this->assertEquals($tnef_data[0]['type'], 'application');
Expand Down
7 changes: 5 additions & 2 deletions framework/Mapi_Utils/test/Horde/Mapi/Utils/MapiTest.php
Expand Up @@ -21,7 +21,10 @@ class Horde_Mapi_Utils_MapiTest extends PHPUnit_Framework_TestCase

public function testFiletimeToUnixTime()
{
$data = file_get_contents('fixtures/filetime');
if (!extension_loaded('bcmath')) {
$this->markTestSkipped("bcmath extension isn't loaded");
}
$data = file_get_contents(__DIR__ . '/fixtures/filetime');
$this->assertEquals(Horde_Mapi_Utils::filetimeToUnixtime($data), 1387818000);
}

Expand All @@ -43,4 +46,4 @@ public function testParseGlobalObjectId()
$this->assertEquals('{81412D3C-2A24-4E9D-B20E-11F7BBE92799}', $uid);
}

}
}

0 comments on commit 2de2274

Please sign in to comment.