Skip to content

Commit f64abd4

Browse files
committed
remoção de anotações do phpunit
1 parent 3094320 commit f64abd4

File tree

6 files changed

+9
-37
lines changed

6 files changed

+9
-37
lines changed

src/Exception/ExceptionCollection.php

-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ class ExceptionCollection extends \Exception implements ExceptionInterface, Iter
1313
*/
1414
protected $exceptions = [];
1515
/**
16-
* @var string
1716
* stan: Property NFePHP\Common\Exception\ExceptionCollection::$shortMessage is never read, only written.
1817
*/
1918
// private $shortMessage;

tests/Certificate/CertificateTest.php

-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
namespace NFePHP\Common\Tests\Certificate;
44

55
use NFePHP\Common\Certificate;
6-
use NFePHP\Common\Exception\CertificateException;
76

87
class CertificateTest extends \PHPUnit\Framework\TestCase
98
{
@@ -42,9 +41,6 @@ public function testShouldLoadCertificate()
4241
$this->assertTrue($certificate->verify('nfe', $dataSigned));
4342
}
4443

45-
/**
46-
* @expectedException NFePHP\Common\Exception\CertificateException
47-
*/
4844
public function testShouldGetExceptionWhenLoadPfxCertificate()
4945
{
5046
$this->expectException(\NFePHP\Common\Exception\CertificateException::class);

tests/SignerTest.php

+4-13
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
use NFePHP\Common\Signer;
66
use NFePHP\Common\Certificate;
7-
use NFePHP\Common\Exception\SignerException;
87

98
class SignerTest extends \PHPUnit\Framework\TestCase
109
{
@@ -44,12 +43,10 @@ public function testIsSigned()
4443

4544
/**
4645
* @covers Signer::existsSignature
47-
* @expectedException NFePHP\Common\Exception\SignerException
4846
*/
4947
public function testSignFailNotXML()
5048
{
51-
$this->expectException(SignerException::class);
52-
49+
$this->expectException(\NFePHP\Common\Exception\SignerException::class);
5350
$pfx = file_get_contents(__DIR__ . '/fixtures/certs/certificado_teste.pfx');
5451
$certificate = Certificate::readPfx($pfx, 'associacao');
5552
$content = "<html><body></body></html>";
@@ -59,12 +56,10 @@ public function testSignFailNotXML()
5956
/**
6057
* @covers Signer::existsSignature
6158
* @covers Signer::digestCheck
62-
* @expectedException NFePHP\Common\Exception\SignerException
6359
*/
6460
public function testIsSignedFailTagNotFound()
6561
{
66-
$this->expectException(SignerException::class);
67-
62+
$this->expectException(\NFePHP\Common\Exception\SignerException::class);
6863
$file = __DIR__ . '/fixtures/xml/NFe/2017signed.xml';
6964
$xml = file_get_contents($file);
7065
Signer::isSigned($xml, 'infCTe');
@@ -75,12 +70,10 @@ public function testIsSignedFailTagNotFound()
7570
* @covers Signer::digestCheck
7671
* @covers Signer::canonize
7772
* @covers Signer::makeDigest
78-
* @expectedException NFePHP\Common\Exception\SignerException
7973
*/
8074
public function testIsSignedFailDigest()
8175
{
82-
$this->expectException(SignerException::class);
83-
76+
$this->expectException(\NFePHP\Common\Exception\SignerException::class);
8477
$file = __DIR__ . '/fixtures/xml/NFe/2017signedDigestFail.xml';
8578
$xml = file_get_contents($file);
8679
Signer::isSigned($xml);
@@ -92,12 +85,10 @@ public function testIsSignedFailDigest()
9285
* @covers Signer::signatureCheck
9386
* @covers Signer::canonize
9487
* @covers Signer::makeDigest
95-
* @expectedException NFePHP\Common\Exception\SignerException
9688
*/
9789
public function testIsSignedFailSignature()
9890
{
99-
$this->expectException(SignerException::class);
100-
91+
$this->expectException(\NFePHP\Common\Exception\SignerException::class);
10192
$file = __DIR__ . '/fixtures/xml/NFe/2017signedSignatureFail.xml';
10293
$xml = file_get_contents($file);
10394
Signer::isSigned($xml);

tests/Soap/SoapFakeTest.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -91,12 +91,10 @@ public function testDisableCertValidation()
9191
}
9292

9393
/**
94-
* @expectedException NFePHP\Common\Exception\RuntimeException
9594
*/
9695
public function testDisableCertValidationFail()
9796
{
98-
$this->expectException(\NFePHP\Common\Exception\RuntimeException::class);
99-
97+
$this->expectException(\NFePHP\Common\Certificate\Exception\Expired::class);
10098
$certificate = Certificate::readPfx(file_get_contents(__DIR__ . self::TEST_PFX_FILE), 'associacao');
10199
new SoapFake($certificate);
102100
}

tests/UFListTest.php

+2-8
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,9 @@ public function testgetUFByCode()
4646
$this->assertEquals('SP', $uf);
4747
}
4848

49-
/**
50-
* @expectedException InvalidArgumentException
51-
*/
5249
public function testgetUFByCodeFail()
5350
{
54-
$this->expectException(\InvalidArgumentException::class);
51+
$this->expectException(\NFePHP\Common\Exception\InvalidArgumentException::class);
5552

5653
UFList::getUFByCode(77);
5754
}
@@ -62,12 +59,9 @@ public function testgetUFByUF()
6259
$this->assertEquals(35, $code);
6360
}
6461

65-
/**
66-
* @expectedException InvalidArgumentException
67-
*/
6862
public function testgetUFByUFFail()
6963
{
70-
$this->expectException(\InvalidArgumentException::class);
64+
$this->expectException(\NFePHP\Common\Exception\InvalidArgumentException::class);
7165

7266
UFList::getCodeByUF('aa');
7367
}

tests/ValidatorTest.php

+2-8
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,9 @@ public function testIsValidTrue()
1717
$this->assertTrue($actual);
1818
}
1919

20-
/**
21-
* @expectedException RuntimeException
22-
*/
2320
public function testIsValidWithErrors()
2421
{
25-
$this->expectException(\RuntimeException::class);
22+
$this->expectException(\NFePHP\Common\Exception\ValidatorException::class);
2623

2724
$xml = file_get_contents(__DIR__ . self::TEST_XML_PATH . 'NFe/' .
2825
'35101158716523000119550010000000011003000000-nfeSigned.xml');
@@ -31,12 +28,9 @@ public function testIsValidWithErrors()
3128
$this->assertFalse($actual);
3229
}
3330

34-
/**
35-
* @expectedException RuntimeException
36-
*/
3731
public function testIsValidWithNoXML()
3832
{
39-
$this->expectException(\RuntimeException::class);
33+
$this->expectException(\NFePHP\Common\Exception\ValidatorException::class);
4034

4135
$xml = 'alkjdkjhdshkjshsjhskjshksjh';
4236
$xsd = __DIR__ . self::TEST_XSD_PATH . 'nfe_v3.10.xsd';

0 commit comments

Comments
 (0)