4
4
5
5
use NFePHP \Common \Signer ;
6
6
use NFePHP \Common \Certificate ;
7
- use NFePHP \Common \Exception \SignerException ;
8
7
9
8
class SignerTest extends \PHPUnit \Framework \TestCase
10
9
{
@@ -44,12 +43,10 @@ public function testIsSigned()
44
43
45
44
/**
46
45
* @covers Signer::existsSignature
47
- * @expectedException NFePHP\Common\Exception\SignerException
48
46
*/
49
47
public function testSignFailNotXML ()
50
48
{
51
- $ this ->expectException (SignerException::class);
52
-
49
+ $ this ->expectException (\NFePHP \Common \Exception \SignerException::class);
53
50
$ pfx = file_get_contents (__DIR__ . '/fixtures/certs/certificado_teste.pfx ' );
54
51
$ certificate = Certificate::readPfx ($ pfx , 'associacao ' );
55
52
$ content = "<html><body></body></html> " ;
@@ -59,12 +56,10 @@ public function testSignFailNotXML()
59
56
/**
60
57
* @covers Signer::existsSignature
61
58
* @covers Signer::digestCheck
62
- * @expectedException NFePHP\Common\Exception\SignerException
63
59
*/
64
60
public function testIsSignedFailTagNotFound ()
65
61
{
66
- $ this ->expectException (SignerException::class);
67
-
62
+ $ this ->expectException (\NFePHP \Common \Exception \SignerException::class);
68
63
$ file = __DIR__ . '/fixtures/xml/NFe/2017signed.xml ' ;
69
64
$ xml = file_get_contents ($ file );
70
65
Signer::isSigned ($ xml , 'infCTe ' );
@@ -75,12 +70,10 @@ public function testIsSignedFailTagNotFound()
75
70
* @covers Signer::digestCheck
76
71
* @covers Signer::canonize
77
72
* @covers Signer::makeDigest
78
- * @expectedException NFePHP\Common\Exception\SignerException
79
73
*/
80
74
public function testIsSignedFailDigest ()
81
75
{
82
- $ this ->expectException (SignerException::class);
83
-
76
+ $ this ->expectException (\NFePHP \Common \Exception \SignerException::class);
84
77
$ file = __DIR__ . '/fixtures/xml/NFe/2017signedDigestFail.xml ' ;
85
78
$ xml = file_get_contents ($ file );
86
79
Signer::isSigned ($ xml );
@@ -92,12 +85,10 @@ public function testIsSignedFailDigest()
92
85
* @covers Signer::signatureCheck
93
86
* @covers Signer::canonize
94
87
* @covers Signer::makeDigest
95
- * @expectedException NFePHP\Common\Exception\SignerException
96
88
*/
97
89
public function testIsSignedFailSignature ()
98
90
{
99
- $ this ->expectException (SignerException::class);
100
-
91
+ $ this ->expectException (\NFePHP \Common \Exception \SignerException::class);
101
92
$ file = __DIR__ . '/fixtures/xml/NFe/2017signedSignatureFail.xml ' ;
102
93
$ xml = file_get_contents ($ file );
103
94
Signer::isSigned ($ xml );
0 commit comments