File tree Expand file tree Collapse file tree
src/UserAgentParser/Exceptions Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88
99namespace vipnytt \UserAgentParser \Exceptions ;
1010
11- use Exception ;
12-
1311/**
1412 * Class UserAgentParserException
1513 *
1614 * @package vipnytt\UserAgentParser\Exceptions
1715 */
18- class UserAgentParserException extends Exception
16+ class UserAgentParserException extends \ Exception
1917{
2018}
Original file line number Diff line number Diff line change 1+ <?php
2+ /**
3+ * vipnytt/UserAgentParser
4+ *
5+ * @link https://github.com/VIPnytt/UserAgentParser
6+ * @license https://github.com/VIPnytt/UserAgentParser/blob/master/LICENSE The MIT License (MIT)
7+ */
8+
9+ namespace vipnytt \UserAgentParser \Tests ;
10+
11+ use PHPUnit \Framework \TestCase ;
12+ use vipnytt \UserAgentParser \Exceptions ;
13+
14+ /**
15+ * Class ExceptionTest
16+ *
17+ * @package vipnytt\UserAgentParser\Tests
18+ */
19+ class ExceptionTest extends TestCase
20+ {
21+ /**
22+ * @throws Exceptions\FormatException
23+ */
24+ public function testFormat ()
25+ {
26+ $ this ->expectException (\InvalidArgumentException::class);
27+ throw new Exceptions \FormatException ();
28+ }
29+
30+ /**
31+ * @throws Exceptions\ProductException
32+ */
33+ public function testProduct ()
34+ {
35+ $ this ->expectException (Exceptions \FormatException::class);
36+ throw new Exceptions \ProductException ();
37+ }
38+
39+ /**
40+ * @throws Exceptions\VersionException
41+ */
42+ public function testVersion ()
43+ {
44+ $ this ->expectException (Exceptions \FormatException::class);
45+ throw new Exceptions \VersionException ();
46+ }
47+
48+ /**
49+ * @throws Exceptions\UserAgentParserException
50+ */
51+ public function testUserAgentParser ()
52+ {
53+ $ this ->expectException (\Exception::class);
54+ throw new Exceptions \UserAgentParserException ();
55+ }
56+ }
You can’t perform that action at this time.
0 commit comments