This repository was archived by the owner on Oct 12, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +17
-16
lines changed
Expand file tree Collapse file tree 5 files changed +17
-16
lines changed Original file line number Diff line number Diff line change 11language : php
22
33php :
4- - 5.4
5- - 5.5
6- - 5.6
7- - 7.0
8- - hhvm
4+ - 7.2
5+ - 7.3
6+ - 7.4
7+ - nightly
98
109sudo : false
1110
Original file line number Diff line number Diff line change 99 }
1010 ],
1111 "require" : {
12- "php" : " ^5.4|^7 .0" ,
12+ "php" : " ^7.2|^8 .0" ,
1313 "ext-dom" : " *"
1414 },
1515 "require-dev" : {
16- "phpunit/phpunit" : " ^4.6 "
16+ "phpunit/phpunit" : " ^8.0|^9.0 "
1717 },
1818 "autoload" : {
1919 "psr-4" : {
Original file line number Diff line number Diff line change 1111
1212namespace PhpBench \Dom \Tests \Unit ;
1313
14+ use PHPUnit \Framework \TestCase ;
1415use PhpBench \Dom \Document ;
1516
16- class DocumentTest extends \PHPUnit_Framework_TestCase
17+ class DocumentTest extends TestCase
1718{
1819 /**
1920 * @var Document
2021 */
2122 private $ document ;
2223
23- public function setUp ()
24+ public function setUp (): void
2425 {
2526 $ this ->document = new Document (1.0 );
2627 }
@@ -52,7 +53,7 @@ public function testEvaluate()
5253 public function testCreateRoot ()
5354 {
5455 $ this ->document ->createRoot ('hello ' );
55- $ this ->assertContains ('<hello/> ' , $ this ->document ->saveXml ());
56+ $ this ->assertStringContainsString ('<hello/> ' , $ this ->document ->saveXml ());
5657 }
5758
5859 /**
Original file line number Diff line number Diff line change 1111
1212namespace PhpBench \Dom \Tests \Unit ;
1313
14+ use PHPUnit \Framework \TestCase ;
1415use PhpBench \Dom \Document ;
1516
16- class ElementTest extends \PHPUnit_Framework_TestCase
17+ class ElementTest extends TestCase
1718{
1819 private $ element ;
1920 private $ document ;
2021
21- public function setUp ()
22+ public function setUp (): void
2223 {
2324 $ this ->document = new Document ();
2425 $ this ->element = $ this ->document ->createRoot ('test ' );
Original file line number Diff line number Diff line change 1111
1212namespace PhpBench \Dom \Tests \Unit ;
1313
14+ use PHPUnit \Framework \TestCase ;
1415use PhpBench \Dom \Document ;
16+ use PhpBench \Dom \Exception \InvalidQueryException ;
1517
16- class XPathTest extends \PHPUnit_Framework_TestCase
18+ class XPathTest extends TestCase
1719{
1820 /**
1921 * It should throw an exception if the xpath query is invalid.
20- *
21- * @expectedException PhpBench\Dom\Exception\InvalidQueryException
22- * @expectedExceptionMessage Errors encountered
2322 */
2423 public function testQueryException ()
2524 {
25+ $ this ->expectException (InvalidQueryException::class);
2626 $ this ->getDocument ()->query ('//article[noexistfunc() = "as"] ' );
2727 }
2828
You can’t perform that action at this time.
0 commit comments