We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 041dd4d commit 6e20d0fCopy full SHA for 6e20d0f
2 files changed
tests/ExceptionMBStringTest.php
@@ -0,0 +1,23 @@
1
+<?php
2
+namespace vipnytt\UserAgentParser\Tests;
3
+
4
+use vipnytt\UserAgentParser;
5
6
+/**
7
+ * Class ExceptionMBStringTest
8
+ *
9
+ * @package vipnytt\UserAgentParser\Tests
10
+ */
11
+class ExceptionMBStringTest extends \PHPUnit_Framework_TestCase
12
+{
13
+ /**
14
+ * Test if exception is thrown when extension `mbstring` is not loaded
15
16
+ public function testExceptionMBString()
17
+ {
18
+ if (!extension_loaded('mbstring')) {
19
+ $this->expectException('\Exception');
20
+ new UserAgentParser('SitemapParser');
21
+ }
22
23
+}
tests/VersionTest.php
@@ -37,6 +37,10 @@ function generateDataForTest()
37
[
38
'bingbot/2.0',
39
'bingbot',
40
+ ],
41
+ [
42
+ 'mybot',
43
44
]
45
];
46
}
0 commit comments