Functional\Tests\IndexesOfTest::test PHP Method

test() public method

public test ( )
    public function test()
    {
        $this->assertSame([0], indexes_of($this->list, 'value1'));
        $this->assertSame([0], indexes_of($this->listIterator, 'value1'));
        $this->assertSame([1, 2], indexes_of($this->list, 'value'));
        $this->assertSame([1, 2], indexes_of($this->listIterator, 'value'));
        $this->assertSame([3], indexes_of($this->list, 'value2'));
        $this->assertSame([3], indexes_of($this->listIterator, 'value2'));
        $this->assertSame(['k1', 'k3'], indexes_of($this->hash, 'val1'));
        $this->assertSame(['k1', 'k3'], indexes_of($this->hashIterator, 'val1'));
        $this->assertSame(['k2'], indexes_of($this->hash, 'val2'));
        $this->assertSame(['k2'], indexes_of($this->hashIterator, 'val2'));
        $this->assertSame(['k4'], indexes_of($this->hash, 'val3'));
        $this->assertSame(['k4'], indexes_of($this->hashIterator, 'val3'));
    }