Skip to content

Commit 93eaa16

Browse files
committed
Fix tests
1 parent 2d89201 commit 93eaa16

File tree

3 files changed

+15
-5
lines changed

3 files changed

+15
-5
lines changed

composer.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,12 @@
1414
"homepage": "https://codeception.com/",
1515
"require": {
1616
"php": "^8.0",
17-
"phpunit/phpunit": "^9.5 | ^10.0"
17+
"guzzlehttp/psr7": "^2.0",
18+
"symfony/css-selector": ">=4.4.24 <7.0"
19+
},
20+
"require-dev": {
21+
"phpunit/phpunit": "^9.5 | ^10.0",
22+
"php-webdriver/webdriver": "^1.12"
1823
},
1924
"conflict": {
2025
"codeception/codeception": "<5.0.0-alpha3"

tests/Util/LocatorTest.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@
44

55
use Codeception\Util\Locator;
66
use Facebook\WebDriver\WebDriverBy;
7+
use PHPUnit\Framework\TestCase;
78

8-
class LocatorTest extends \PHPUnit\Framework\TestCase
9+
class LocatorTest extends TestCase
910
{
1011
public function testCombine()
1112
{
@@ -88,8 +89,10 @@ public function testHumanReadableString()
8889
{
8990
$this->assertSame("'string selector'", Locator::humanReadableString("string selector"));
9091
$this->assertSame("css '.something'", Locator::humanReadableString(['css' => '.something']));
91-
//WebDriver is no longer a dependency of core, so this can't be testedI
92-
//$this->assertSame("css selector '.something'", Locator::humanReadableString(WebDriverBy::cssSelector('.something')) );
92+
$this->assertSame(
93+
"css selector '.something'",
94+
Locator::humanReadableString(WebDriverBy::cssSelector('.something'))
95+
);
9396
}
9497

9598
public function testLocatingElementPosition()

tests/Util/UriTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44

55
namespace Codeception\Util;
66

7-
class UriTest extends \Codeception\Test\Unit
7+
use PHPUnit\Framework\TestCase;
8+
9+
class UriTest extends TestCase
810
{
911
public function testUrlMerge()
1012
{

0 commit comments

Comments
 (0)