Skip to content

Commit d5ee25f

Browse files
committed
Merge pull request #214 from thegreenter/fix-phpunit-warn
1 parent c93c66a commit d5ee25f

6 files changed

+15
-15
lines changed

composer.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"require": {
1818
"php": ">=7.4",
1919
"ext-dom": "*",
20-
"greenter/core": "^4.4"
20+
"greenter/core": "^5.0"
2121
},
2222
"autoload": {
2323
"psr-4": {
@@ -31,7 +31,7 @@
3131
},
3232
"extra": {
3333
"branch-alias": {
34-
"dev-master": "4.4-dev"
34+
"dev-master": "5.0-dev"
3535
}
3636
}
3737
}

tests/Xml/Parser/DespatchParserTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function testParseDoc($filename)
3131
$obj = $this->getParser()->parse($xml);
3232

3333
$this->assertEquals('09', $obj->getTipoDoc());
34-
$this->assertRegExp('/^T\w{3}/', $obj->getSerie());
34+
$this->assertMatchesRegularExpression('/^T\w{3}/', $obj->getSerie());
3535
$this->assertNotNull($obj->getCompany());
3636
$this->assertNotNull($obj->getDestinatario());
3737
$this->assertLessThanOrEqual(8, strlen($obj->getCorrelativo()));

tests/Xml/Parser/InvoiceParserTest.php

+6-6
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ public function testParseSunatSOL($filename)
2828
/**@var $obj Invoice */
2929
$obj = $parser->parse($xml);
3030

31-
$this->assertRegExp('/^0\d{1}/', $obj->getTipoDoc());
32-
$this->assertRegExp('/^E\w{3}/', $obj->getSerie());
31+
$this->assertMatchesRegularExpression('/^0\d{1}/', $obj->getTipoDoc());
32+
$this->assertMatchesRegularExpression('/^E\w{3}/', $obj->getSerie());
3333
$this->assertLessThanOrEqual(8, strlen($obj->getCorrelativo()));
3434
$this->assertNotEmpty($obj->getFechaEmision());
3535
$this->assertGreaterThanOrEqual(1, count($obj->getDetails()));
@@ -52,8 +52,8 @@ public function testFacParse($filename)
5252
/**@var $obj Invoice */
5353
$obj = $parser->parse($xml);
5454

55-
$this->assertRegExp('/^0\d{1}/', $obj->getTipoDoc());
56-
$this->assertRegExp('/^[FB]\w{3}/', $obj->getSerie());
55+
$this->assertMatchesRegularExpression('/^0\d{1}/', $obj->getTipoDoc());
56+
$this->assertMatchesRegularExpression('/^[FB]\w{3}/', $obj->getSerie());
5757
$this->assertLessThanOrEqual(8, strlen($obj->getCorrelativo()));
5858
$this->assertNotEmpty($obj->getFechaEmision());
5959
$this->assertGreaterThanOrEqual(1, count($obj->getDetails()));
@@ -71,8 +71,8 @@ public function testFacParseFromDoc()
7171
/**@var $obj Invoice */
7272
$obj = $parser->parse($doc);
7373

74-
$this->assertRegExp('/^0\d{1}/', $obj->getTipoDoc());
75-
$this->assertRegExp('/^[FB]\w{3}/', $obj->getSerie());
74+
$this->assertMatchesRegularExpression('/^0\d{1}/', $obj->getTipoDoc());
75+
$this->assertMatchesRegularExpression('/^[FB]\w{3}/', $obj->getSerie());
7676
$this->assertLessThanOrEqual(8, strlen($obj->getCorrelativo()));
7777
$this->assertNotEmpty($obj->getFechaEmision());
7878
$this->assertGreaterThanOrEqual(1, count($obj->getDetails()));

tests/Xml/Parser/PerceptionParserTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ public function testParseDoc($filename)
2626
/**@var $obj Perception */
2727
$obj = $this->getParser()->parse($xml);
2828

29-
$this->assertRegExp('/^[P][0-9A-Z]{3}$/', $obj->getSerie());
30-
$this->assertRegExp('/^\d+$/', $obj->getCorrelativo());
29+
$this->assertMatchesRegularExpression('/^[P][0-9A-Z]{3}$/', $obj->getSerie());
30+
$this->assertMatchesRegularExpression('/^\d+$/', $obj->getCorrelativo());
3131
$this->assertNotNull($obj->getCompany());
3232
$this->assertNotNull($obj->getProveedor());
3333
$this->assertGreaterThan(0, count($obj->getDetails()));

tests/Xml/Parser/RetentionParserTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ public function testParseDoc($filename)
2626
/**@var $obj Retention */
2727
$obj = $this->getParser()->parse($xml);
2828

29-
$this->assertRegExp('/^[R][0-9A-Z]{3}$/', $obj->getSerie());
30-
$this->assertRegExp('/^\d+$/', $obj->getCorrelativo());
29+
$this->assertMatchesRegularExpression('/^[R][0-9A-Z]{3}$/', $obj->getSerie());
30+
$this->assertMatchesRegularExpression('/^\d+$/', $obj->getCorrelativo());
3131
$this->assertNotNull($obj->getCompany());
3232
$this->assertNotNull($obj->getProveedor());
3333
$this->assertGreaterThan(0, count($obj->getDetails()));

tests/Xml/Parser/SummaryParserTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@ public function testParseDoc($filename)
2727
$obj = $this->getParser()->parse($xml);
2828

2929
$this->assertStringContainsString('RC', $obj->getName());
30-
$this->assertRegExp('/^\d+$/', $obj->getCorrelativo());
30+
$this->assertMatchesRegularExpression('/^\d+$/', $obj->getCorrelativo());
3131
$this->assertNotNull($obj->getCompany());
3232
$this->assertGreaterThan(0, count($obj->getDetails()));
3333

3434
foreach ($obj->getDetails() as $detail) {
3535
$this->assertTrue(in_array($detail->getTipoDoc(), ['03', '07', '08']));
3636
$this->assertTrue(in_array($detail->getEstado(), ['1', '2', '3']));
37-
$this->assertRegExp('/^B\d{3}-\d{1,8}$/', $detail->getSerieNro());
37+
$this->assertMatchesRegularExpression('/^B\d{3}-\d{1,8}$/', $detail->getSerieNro());
3838
$this->assertTrue(is_float($detail->getTotal()));
3939
if ($detail->getDocReferencia()) {
4040
$ref = $detail->getDocReferencia();

0 commit comments

Comments
 (0)