mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-27 22:33:10 +09:00
Fix strict count() behavior in PHP 7.2
This commit is contained in:
parent
6f7f92f3e2
commit
6f35f5bafc
7 changed files with 43 additions and 16 deletions
|
|
@ -149,6 +149,13 @@ class FunctionsTest extends \Codeception\TestCase\Test
|
|||
$this->assertFalse(tobool(array()));
|
||||
}
|
||||
|
||||
public function testCountObj()
|
||||
{
|
||||
$this->assertEquals(3, countobj(array('foo' => 1, 'bar' => 2, 'baz' => 3)));
|
||||
$this->assertEquals(3, countobj((object)array('foo' => 1, 'bar' => 2, 'baz' => 3)));
|
||||
$this->assertEquals(1, countobj('foobar'));
|
||||
}
|
||||
|
||||
public function testUTF8Functions()
|
||||
{
|
||||
$this->assertTrue(utf8_check('Hello, world!'));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue