Skip to content

Commit

Permalink
Updated tests
Browse files Browse the repository at this point in the history
  • Loading branch information
JanPetterMG committed Apr 8, 2016
1 parent 041dd4d commit 6e20d0f
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
23 changes: 23 additions & 0 deletions tests/ExceptionMBStringTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php
namespace vipnytt\UserAgentParser\Tests;

use vipnytt\UserAgentParser;

/**
* Class ExceptionMBStringTest
*
* @package vipnytt\UserAgentParser\Tests
*/
class ExceptionMBStringTest extends \PHPUnit_Framework_TestCase
{
/**
* Test if exception is thrown when extension `mbstring` is not loaded
*/
public function testExceptionMBString()
{
if (!extension_loaded('mbstring')) {
$this->expectException('\Exception');
new UserAgentParser('SitemapParser');
}
}
}
4 changes: 4 additions & 0 deletions tests/VersionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ function generateDataForTest()
[
'bingbot/2.0',
'bingbot',
],
[
'mybot',
'mybot',
]
];
}
Expand Down

0 comments on commit 6e20d0f

Please sign in to comment.