Skip to content

Commit c9af74e

Browse files
carusogabrielDavertMik
authored andcommitted
Use dedicated PHPUnit assertions (#4950)
1 parent 925762b commit c9af74e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/Codeception/Module/REST.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ public function dontSeeHttpHeader($name, $value = null)
241241
public function seeHttpHeaderOnce($name)
242242
{
243243
$headers = $this->getRunningClient()->getInternalResponse()->getHeader($name, false);
244-
$this->assertEquals(1, count($headers));
244+
$this->assertCount(1, $headers);
245245
}
246246

247247
/**

tests/unit/Codeception/Util/JsonArrayTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ public function testXmlArrayConversion2()
3636

3737
public function testXPathLocation()
3838
{
39-
$this->assertTrue($this->jsonArray->filterByXPath('//ticket/title')->length > 0);
40-
$this->assertTrue($this->jsonArray->filterByXPath('//ticket/user/name')->length > 0);
41-
$this->assertTrue($this->jsonArray->filterByXPath('//user/name')->length > 0);
39+
$this->assertGreaterThan(0, $this->jsonArray->filterByXPath('//ticket/title')->length);
40+
$this->assertGreaterThan(0, $this->jsonArray->filterByXPath('//ticket/user/name')->length);
41+
$this->assertGreaterThan(0, $this->jsonArray->filterByXPath('//user/name')->length);
4242
}
4343

4444
public function testJsonPathLocation()

0 commit comments

Comments
 (0)