NsplTest\ATest::testAny PHP Метод

testAny() публичный Метод

public testAny ( )
    public function testAny()
    {
        $this->assertTrue(any([true, false, false]));
        $this->assertTrue(any([false, 1, false]));
        $this->assertTrue(any([false, false, [1]]));
        $this->assertTrue(any(['a', false, false]));
        $this->assertTrue(any([false, new \StdClass(), false]));
        $this->assertFalse(any([]));
        $this->assertFalse(any([null, false, false]));
        $this->assertFalse(any([null, [], false]));
        $this->assertFalse(any([null, false, '']));
        $this->assertFalse(any([0, false, false]));
        $this->assertTrue(any([18, 19, 20], function ($v) {
            return $v === 18;
        }));
        $this->assertFalse(any([19, 20, 21], function ($v) {
            return $v === 18;
        }));
        $this->assertTrue(call_user_func(any, [true, false, false]));
        $this->assertEquals('\\nspl\\a\\any', any);
    }