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

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

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