How to write a negative test in which I want to note that if count($jsonToArrayAll) not equal to 2, this is false.
$this->assertFalse(assertNotEquals(2, count($jsonToArrayAll))); How to write a negative test in which I want to note that if count($jsonToArrayAll) not equal to 2, this is false.
$this->assertFalse(assertNotEquals(2, count($jsonToArrayAll))); assertNotEquals() is a procedure, not a function — it returns nothing. Accordingly, assertFalse() will not work as expected.
That's right (any of these assertions):
// проверяет, что всё условие не верно $this->assertFalse(2 == count($jsonToArrayAll)); // проверяет, что count($jsonToArrayAll) не равно 2 $this->assertNotEquals(2, count($jsonToArrayAll)); assertTrue , or assertEquals , you are trying to do something incomprehensible - BOPOHSource: https://ru.stackoverflow.com/questions/482699/
All Articles
count($jsonToArrayAll)is equal to two or not and nothing else. Those. either$this->assertNotEquals(2, count($jsonToArrayAll)), or$this->assertFalse(2 == count($jsonToArrayAll));- BOPOH